Class: Jsapi::Meta::OAuthFlow
- Inherits:
-
Model::Base
- Object
- Model::Base
- Jsapi::Meta::OAuthFlow
- Includes:
- Jsapi::Meta::OpenAPI::Extensions
- Defined in:
- lib/jsapi/meta/oauth_flow.rb
Overview
Represents an OAuth flow object.
Defined Under Namespace
Classes: Scope
Constant Summary
Constants included from Model::Attributes
Model::Attributes::DEFAULT_ARRAY, Model::Attributes::DEFAULT_HASH
Instance Method Summary collapse
-
#authorization_url ⇒ Object
:attr: authorization_url The authorization URL to be used for the flow.
-
#device_authorization_url ⇒ Object
:attr: device_authorization_url The device 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 OpenAPI OAuth flow object.
-
#token_url ⇒ Object
:attr: token_url The token URL to be used for the flow.
Methods included from Jsapi::Meta::OpenAPI::Extensions
Methods inherited from Model::Base
#initialize, #inspect, #merge!, #reference?, #resolve
Methods included from Model::Attributes
Constructor Details
This class inherits a constructor from Jsapi::Meta::Model::Base
Instance Method Details
#authorization_url ⇒ Object
:attr: authorization_url The authorization URL to be used for the flow.
19 |
# File 'lib/jsapi/meta/oauth_flow.rb', line 19 attribute :authorization_url, String |
#device_authorization_url ⇒ Object
:attr: device_authorization_url The device authorization URL to be used for the flow.
Note that the device authorization URL was introduced with OpenAPI 3.2. It is omitted when generating an OpenAPI document with a lower version.
27 |
# File 'lib/jsapi/meta/oauth_flow.rb', line 27 attribute :device_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 omitted when generating an OpenAPI document with a lower version.
35 |
# File 'lib/jsapi/meta/oauth_flow.rb', line 35 attribute :refresh_url, String |
#scopes ⇒ Object
:attr: scopes The hash containing the scopes.
40 |
# File 'lib/jsapi/meta/oauth_flow.rb', line 40 attribute :scopes, { String => Scope } |
#to_openapi(version) ⇒ Object
Returns a hash representing the OpenAPI OAuth flow object.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/jsapi/meta/oauth_flow.rb', line 48 def to_openapi(version, *) version = OpenAPI::Version.from(version) with_openapi_extensions( authorizationUrl: , deviceAuthorizationUrl: ( if version >= OpenAPI::V3_2), tokenUrl: token_url, refreshUrl: (refresh_url if version >= OpenAPI::V3_0), scopes: scopes.transform_values(&:description) ) end |
#token_url ⇒ Object
:attr: token_url The token URL to be used for the flow.
45 |
# File 'lib/jsapi/meta/oauth_flow.rb', line 45 attribute :token_url, String |