Class: Justa::Authenticator
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(client) ⇒ Authenticator
constructor
Initialize Authenticator Class.
-
#token ⇒ String
Return client authentication token.
Constructor Details
#initialize(client) ⇒ Authenticator
Initialize Authenticator Class
63 64 65 66 67 |
# File 'lib/justa/authenticator.rb', line 63 def initialize(client) @client = client @key = client.key authenticate end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
56 57 58 |
# File 'lib/justa/authenticator.rb', line 56 def client @client end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
56 57 58 |
# File 'lib/justa/authenticator.rb', line 56 def key @key end |
Instance Method Details
#token ⇒ String
Return client authentication token
74 75 76 77 |
# File 'lib/justa/authenticator.rb', line 74 def token refresh_token_if_expired @a_token end |