Class: Zaikio::OAuthClient::ClientConfiguration::OrganizationConnection
- Inherits:
-
Object
- Object
- Zaikio::OAuthClient::ClientConfiguration::OrganizationConnection
- Defined in:
- lib/zaikio/oauth_client/client_configuration.rb
Instance Attribute Summary collapse
-
#default_scopes ⇒ Object
Returns the value of attribute default_scopes.
Instance Method Summary collapse
-
#initialize ⇒ OrganizationConnection
constructor
A new instance of OrganizationConnection.
- #scopes_for_auth(id = nil) ⇒ Object
Constructor Details
#initialize ⇒ OrganizationConnection
Returns a new instance of OrganizationConnection.
54 55 56 |
# File 'lib/zaikio/oauth_client/client_configuration.rb', line 54 def initialize @default_scopes = [] end |
Instance Attribute Details
#default_scopes ⇒ Object
Returns the value of attribute default_scopes.
52 53 54 |
# File 'lib/zaikio/oauth_client/client_configuration.rb', line 52 def default_scopes @default_scopes end |
Instance Method Details
#scopes_for_auth(id = nil) ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/zaikio/oauth_client/client_configuration.rb', line 58 def scopes_for_auth(id = nil) plain_scopes = Zaikio::OAuthClient.get_plain_scopes(default_scopes) plain_scopes.map do |scope| id ? "Org/#{id}.#{scope}" : "Org.#{scope}" end end |