Class: Capcoauth::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/capcoauth/config.rb

Defined Under Namespace

Classes: Builder

Constant Summary collapse

CAPCOAUTH_URL_DEFAULT =
'https://capcoauth.capco.com'.freeze
TOKEN_VERIFY_TTL_DEFAULT =
10.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cache_storeObject

Returns the value of attribute cache_store.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def cache_store
  @cache_store
end

#capcoauth_urlObject

Returns the value of attribute capcoauth_url.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def capcoauth_url
  @capcoauth_url
end

#loggerObject

Returns the value of attribute logger.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def logger
  @logger
end

#perform_login_redirectsObject

Returns the value of attribute perform_login_redirects.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def 
  @perform_login_redirects
end

#require_userObject

Returns the value of attribute require_user.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def require_user
  @require_user
end

#token_verify_ttlObject

Returns the value of attribute token_verify_ttl.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def token_verify_ttl
  @token_verify_ttl
end

#user_id_fieldObject

Returns the value of attribute user_id_field.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def user_id_field
  @user_id_field
end

#user_resolverObject

Returns the value of attribute user_resolver.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def user_resolver
  @user_resolver
end

#using_routesObject

Returns the value of attribute using_routes.



48
49
50
# File 'lib/capcoauth/config.rb', line 48

def using_routes
  @using_routes
end

Instance Method Details

#client_idObject



58
59
60
# File 'lib/capcoauth/config.rb', line 58

def client_id
  @client_id || raise(MissingRequiredOptionError, 'Missing required option `client_id`')
end

#client_id=(val = nil) ⇒ Object



61
62
63
64
# File 'lib/capcoauth/config.rb', line 61

def client_id= (val=nil)
  raise(MissingRequiredOptionError, '`client_id` cannot be set to nil') if val.nil?
  @client_id = val
end

#client_secretObject



65
66
67
# File 'lib/capcoauth/config.rb', line 65

def client_secret
  @client_secret || raise(MissingRequiredOptionError, 'Missing required option `client_secret`')
end

#client_secret=(val = nil) ⇒ Object



68
69
70
71
# File 'lib/capcoauth/config.rb', line 68

def client_secret= (val=nil)
  raise(MissingRequiredOptionError, '`client_secret` cannot be set to nil') if val.nil?
  @client_secret = val
end