Class: OauthTokenVerifier::TokenVerifier
- Inherits:
-
Object
- Object
- OauthTokenVerifier::TokenVerifier
- Defined in:
- lib/oauth_token_verifier.rb
Defined Under Namespace
Classes: NoProviderFoundError, TokenCheckError
Instance Attribute Summary collapse
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(provider_name, token) ⇒ TokenVerifier
constructor
A new instance of TokenVerifier.
- #verify_token ⇒ Object
Constructor Details
#initialize(provider_name, token) ⇒ TokenVerifier
Returns a new instance of TokenVerifier.
39 40 41 42 |
# File 'lib/oauth_token_verifier.rb', line 39 def initialize(provider_name, token) @provider = find_provider(provider_name).new @token = token end |
Instance Attribute Details
#provider ⇒ Object
Returns the value of attribute provider.
24 25 26 |
# File 'lib/oauth_token_verifier.rb', line 24 def provider @provider end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
23 24 25 |
# File 'lib/oauth_token_verifier.rb', line 23 def token @token end |
Instance Method Details
#verify_token ⇒ Object
44 45 46 |
# File 'lib/oauth_token_verifier.rb', line 44 def verify_token @provider.verify_token(self) end |