Class: OpenApi::OAuthFlow
- Inherits:
-
Object
- Object
- OpenApi::OAuthFlow
- Includes:
- EquatableAsContent
- Defined in:
- lib/open_api/o_auth_flow.rb
Overview
Instance Attribute Summary collapse
-
#authorization_url ⇒ Object
Returns the value of attribute authorization_url.
-
#refresh_url ⇒ Object
Returns the value of attribute refresh_url.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#token_url ⇒ Object
Returns the value of attribute token_url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(authorization_url:, token_url:, refresh_url: nil, scopes:) ⇒ OAuthFlow
constructor
A new instance of OAuthFlow.
Methods included from EquatableAsContent
Constructor Details
#initialize(authorization_url:, token_url:, refresh_url: nil, scopes:) ⇒ OAuthFlow
Returns a new instance of OAuthFlow.
8 9 10 11 12 13 |
# File 'lib/open_api/o_auth_flow.rb', line 8 def initialize(authorization_url:, token_url:, refresh_url: nil, scopes:) self. = self.token_url = token_url self.refresh_url = refresh_url self.scopes = scopes.with_indifferent_access end |
Instance Attribute Details
#authorization_url ⇒ Object
Returns the value of attribute authorization_url.
6 7 8 |
# File 'lib/open_api/o_auth_flow.rb', line 6 def @authorization_url end |
#refresh_url ⇒ Object
Returns the value of attribute refresh_url.
6 7 8 |
# File 'lib/open_api/o_auth_flow.rb', line 6 def refresh_url @refresh_url end |
#scopes ⇒ Object
Returns the value of attribute scopes.
6 7 8 |
# File 'lib/open_api/o_auth_flow.rb', line 6 def scopes @scopes end |
#token_url ⇒ Object
Returns the value of attribute token_url.
6 7 8 |
# File 'lib/open_api/o_auth_flow.rb', line 6 def token_url @token_url end |
Class Method Details
.load(hash) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/open_api/o_auth_flow.rb', line 15 def self.load(hash) return unless hash new( authorization_url: hash["authorizationUrl"], token_url: hash["tokenUrl"], refresh_url: hash["refreshUrl"], scopes: hash["scopes"], ) end |