class Azure::Directory::Config
Attributes
client_id[R]
client_secret[R]
resource_id[R]
scope_name[R]
tenant_id[R]
Public Class Methods
new(scope_name = :main)
click to toggle source
# File lib/azure/directory/config.rb, line 27 def initialize(scope_name = :main) @scope_name = scope_name end
Public Instance Methods
load_token()
click to toggle source
# File lib/azure/directory/config.rb, line 41 def load_token @token_store and @token_store.load(@scope_name) end
save_token(token_hash)
click to toggle source
# File lib/azure/directory/config.rb, line 36 def save_token(token_hash) token_hash = token_hash.slice('access_token', 'token_type', 'expires_at') @token_store and @token_store.save(@scope_name, token_hash) end
using(scope)
click to toggle source
# File lib/azure/directory/config.rb, line 31 def using(scope) @scopes[scope] end