Module: Touchpass

Defined in:
lib/engine.rb,
lib/touchpass.rb,
lib/touchpass/prp.rb,
lib/touchpass/crypt.rb,
lib/touchpass/client.rb,
lib/touchpass/version.rb,
lib/touchpass/rp/device.rb,
lib/touchpass/rp/response.rb,
lib/touchpass/verification.rb,
lib/touchpass/rp/verification.rb,
lib/touchpass/key_file_creator.rb,
lib/generators/touchpass/install_generator.rb,
app/controllers/touchpass/verifications_controller.rb

Defined Under Namespace

Modules: Generators, MessagingType, Proximity, Role, Rp Classes: Client, Crypt, Engine, KeyFileCreator, Verification, VerificationsController

Constant Summary collapse

DEFAULT_HOST =
"localhost"
DEFAULT_PORT =
"3000"
DEFAULT_USE_HTTPS =
true
VERSION =
"0.1.5"

Class Method Summary collapse

Class Method Details

.base_uriObject



47
48
49
50
51
52
53
54
55
# File 'lib/touchpass.rb', line 47

def self.base_uri
  tp_base_uri = Touchpass.host
  port = Touchpass.port.to_s
  unless port.empty?  # .present? is a rails add-on
    tp_base_uri += ":#{port}"
  end
  protocol = Touchpass.use_https ? "https://" : "http://"
  tp_base_uri = protocol + tp_base_uri
end

.setup {|_self| ... } ⇒ Object

Default way to setup Touchpass. Run rails generate touchpass_install to create a fresh initializer with all configuration values.

Yields:

  • (_self)

Yield Parameters:

  • _self (Touchpass)

    the object that the method was called on



43
44
45
# File 'lib/touchpass.rb', line 43

def self.setup
  yield self
end