Class: Obscured::Doorman::Providers::Bitbucket::AccessToken
- Inherits:
-
Object
- Object
- Obscured::Doorman::Providers::Bitbucket::AccessToken
- Defined in:
- lib/obscured-doorman/providers/bitbucket/access_token.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#emails ⇒ Object
Returns the value of attribute emails.
-
#expires_date ⇒ Object
Returns the value of attribute expires_date.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AccessToken
constructor
A new instance of AccessToken.
Constructor Details
#initialize(attributes = {}) ⇒ AccessToken
Returns a new instance of AccessToken.
15 16 17 18 19 20 21 22 |
# File 'lib/obscured-doorman/providers/bitbucket/access_token.rb', line 15 def initialize(attributes = {}) @access_token = attributes[:access_token] @refresh_token = attributes[:refresh_token] @scopes = attributes[:scopes] @expires_in = attributes[:expires_in] @expires_date = DateTime.now + expires_in.to_i.seconds @emails = attributes[:emails] end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
8 9 10 |
# File 'lib/obscured-doorman/providers/bitbucket/access_token.rb', line 8 def access_token @access_token end |
#emails ⇒ Object
Returns the value of attribute emails.
13 14 15 |
# File 'lib/obscured-doorman/providers/bitbucket/access_token.rb', line 13 def emails @emails end |
#expires_date ⇒ Object
Returns the value of attribute expires_date.
12 13 14 |
# File 'lib/obscured-doorman/providers/bitbucket/access_token.rb', line 12 def expires_date @expires_date end |
#expires_in ⇒ Object
Returns the value of attribute expires_in.
11 12 13 |
# File 'lib/obscured-doorman/providers/bitbucket/access_token.rb', line 11 def expires_in @expires_in end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
9 10 11 |
# File 'lib/obscured-doorman/providers/bitbucket/access_token.rb', line 9 def refresh_token @refresh_token end |
#scopes ⇒ Object
Returns the value of attribute scopes.
10 11 12 |
# File 'lib/obscured-doorman/providers/bitbucket/access_token.rb', line 10 def scopes @scopes end |