Class: BotFramework::TokenValidator
- Inherits:
-
Object
- Object
- BotFramework::TokenValidator
- Includes:
- HTTParty
- Defined in:
- lib/bot_framework/token_validator.rb
Constant Summary collapse
- OPEN_ID_CONFIG_URI =
'https://api.aps.skype.com/v1/.well-known/openidconfiguration'.freeze
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#headers ⇒ Object
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(headers) ⇒ TokenValidator
constructor
A new instance of TokenValidator.
- #valid? ⇒ Boolean
Constructor Details
#initialize(headers) ⇒ TokenValidator
Returns a new instance of TokenValidator.
8 9 10 |
# File 'lib/bot_framework/token_validator.rb', line 8 def initialize(headers) @headers = headers end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/bot_framework/token_validator.rb', line 4 def errors @errors end |
#headers ⇒ Object
Returns the value of attribute headers.
4 5 6 |
# File 'lib/bot_framework/token_validator.rb', line 4 def headers @headers end |
Instance Method Details
#valid? ⇒ Boolean
12 13 14 15 16 17 18 19 |
# File 'lib/bot_framework/token_validator.rb', line 12 def valid? valid_header? && valid_jwt? && valid_iss? && valid_audience? && valid_token? && valid_signature? end |