Class: Jsapi::Meta::OpenAPI::OAuthFlow
- Defined in:
- lib/jsapi/meta/openapi/oauth_flow.rb
Overview
Represents an OAuth flow object.
Defined Under Namespace
Classes: Scope
Instance Method Summary collapse
-
#authorization_url ⇒ Object
:attr: authorization_url The authorization URL to be used for the flow.
-
#refresh_url ⇒ Object
:attr: refresh_url The refresh URL to be used for the flow.
-
#scopes ⇒ Object
:attr: scopes The hash containing the scopes.
-
#to_openapi(version) ⇒ Object
Returns a hash representing the OAuth flow object.
-
#token_url ⇒ Object
:attr: token_url The token URL to be used for the flow.
Methods inherited from Base
#initialize, #inspect, #reference?, #resolve
Methods included from Attributes::ClassMethods
Constructor Details
This class inherits a constructor from Jsapi::Meta::Base
Instance Method Details
#authorization_url ⇒ Object
:attr: authorization_url The authorization URL to be used for the flow.
18 |
# File 'lib/jsapi/meta/openapi/oauth_flow.rb', line 18 attribute :authorization_url, String |
#refresh_url ⇒ Object
:attr: refresh_url The refresh URL to be used for the flow.
Note that the refresh URL was introduced with OpenAPI 3.0. It is skipped when generating an OpenAPI 2.0 document.
26 |
# File 'lib/jsapi/meta/openapi/oauth_flow.rb', line 26 attribute :refresh_url, String |
#scopes ⇒ Object
:attr: scopes The hash containing the scopes.
31 |
# File 'lib/jsapi/meta/openapi/oauth_flow.rb', line 31 attribute :scopes, { String => Scope }, default: {} |
#to_openapi(version) ⇒ Object
Returns a hash representing the OAuth flow object.
39 40 41 42 43 44 45 46 |
# File 'lib/jsapi/meta/openapi/oauth_flow.rb', line 39 def to_openapi(version) { authorizationUrl: , tokenUrl: token_url, refreshUrl: (refresh_url if version.major > 2), scopes: scopes.transform_values(&:description) }.compact end |
#token_url ⇒ Object
:attr: token_url The token URL to be used for the flow.
36 |
# File 'lib/jsapi/meta/openapi/oauth_flow.rb', line 36 attribute :token_url, String |