Class: Tinypass::Config
- Inherits:
-
Object
- Object
- Tinypass::Config
- Defined in:
- lib/tinypass.rb
Constant Summary collapse
- VERSION =
"2.0.7"- MSG_VERSION =
"2.0p"- CONTEXT =
"/v2"- REST_CONTEXT =
"/r2"- COOKIE_PREFIX =
"__TP_"- COOKIE_SUFFIX =
"_TOKEN"
Instance Attribute Summary collapse
-
#aid ⇒ Object
Returns the value of attribute aid.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Class Method Summary collapse
Instance Attribute Details
#aid ⇒ Object
Returns the value of attribute aid.
32 33 34 |
# File 'lib/tinypass.rb', line 32 def aid @aid end |
#private_key ⇒ Object
Returns the value of attribute private_key.
32 33 34 |
# File 'lib/tinypass.rb', line 32 def private_key @private_key end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
32 33 34 |
# File 'lib/tinypass.rb', line 32 def sandbox @sandbox end |
Class Method Details
.app_prefix(aid) ⇒ Object
34 35 36 |
# File 'lib/tinypass.rb', line 34 def self.app_prefix(aid) COOKIE_PREFIX + aid end |
.endpoint ⇒ Object
42 43 44 45 46 |
# File 'lib/tinypass.rb', line 42 def self.endpoint return Tinypass::API_ENDPOINT_DEV if defined?(Tinypass::API_ENDPOINT_DEV) Tinypass.sandbox ? Tinypass::API_ENDPOINT_SANDBOX : Tinypass::API_ENDPOINT_PROD end |
.token_cookie_name(aid = Tinypass::aid) ⇒ Object
38 39 40 |
# File 'lib/tinypass.rb', line 38 def self.(aid = Tinypass::aid) COOKIE_PREFIX + aid + COOKIE_SUFFIX end |