Class: KindeSdk::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/kinde_sdk/configuration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Configuration

Returns a new instance of Configuration.

Yields:

  • (_self)

Yield Parameters:



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/kinde_sdk/configuration.rb', line 25

def initialize
  @authorize_url = '/oauth2/auth'
  @token_url = '/oauth2/token'
  @jwks_url = '/.well-known/jwks.json'
  @expected_audience = nil
  @expected_issuer = nil
  @debugging = false
  @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
  @scope = 'openid offline email profile'
  @pkce_enabled = true
  @auto_refresh_tokens = true
  @force_api = false

  yield(self) if block_given?
end

Instance Attribute Details

#authorize_urlObject

Returns the value of attribute authorize_url.



10
11
12
# File 'lib/kinde_sdk/configuration.rb', line 10

def authorize_url
  @authorize_url
end

#auto_refresh_tokensObject

Returns the value of attribute auto_refresh_tokens.



22
23
24
# File 'lib/kinde_sdk/configuration.rb', line 22

def auto_refresh_tokens
  @auto_refresh_tokens
end

#callback_urlObject

Returns the value of attribute callback_url.



6
7
8
# File 'lib/kinde_sdk/configuration.rb', line 6

def callback_url
  @callback_url
end

#client_idObject

Returns the value of attribute client_id.



4
5
6
# File 'lib/kinde_sdk/configuration.rb', line 4

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



5
6
7
# File 'lib/kinde_sdk/configuration.rb', line 5

def client_secret
  @client_secret
end

#debuggingObject

Returns the value of attribute debugging.



19
20
21
# File 'lib/kinde_sdk/configuration.rb', line 19

def debugging
  @debugging
end

#domainObject

Returns the value of attribute domain.



3
4
5
# File 'lib/kinde_sdk/configuration.rb', line 3

def domain
  @domain
end

#expected_audienceObject

Returns the value of attribute expected_audience.



16
17
18
# File 'lib/kinde_sdk/configuration.rb', line 16

def expected_audience
  @expected_audience
end

#expected_issuerObject

Returns the value of attribute expected_issuer.



15
16
17
# File 'lib/kinde_sdk/configuration.rb', line 15

def expected_issuer
  @expected_issuer
end

#force_apiObject

Returns the value of attribute force_api.



23
24
25
# File 'lib/kinde_sdk/configuration.rb', line 23

def force_api
  @force_api
end

#jwksObject

Returns the value of attribute jwks.



14
15
16
# File 'lib/kinde_sdk/configuration.rb', line 14

def jwks
  @jwks
end

#jwks_urlObject

Returns the value of attribute jwks_url.



13
14
15
# File 'lib/kinde_sdk/configuration.rb', line 13

def jwks_url
  @jwks_url
end

#loggerObject

Returns the value of attribute logger.



18
19
20
# File 'lib/kinde_sdk/configuration.rb', line 18

def logger
  @logger
end

#logout_urlObject

Returns the value of attribute logout_url.



7
8
9
# File 'lib/kinde_sdk/configuration.rb', line 7

def logout_url
  @logout_url
end

#oauth_client(client_id: @client_id, client_secret: @client_secret, domain: @domain, authorize_url: @authorize_url, token_url: @token_url) ⇒ Object

Returns the value of attribute oauth_client.



20
21
22
# File 'lib/kinde_sdk/configuration.rb', line 20

def oauth_client
  @oauth_client
end

#pkce_enabledObject

Returns the value of attribute pkce_enabled.



21
22
23
# File 'lib/kinde_sdk/configuration.rb', line 21

def pkce_enabled
  @pkce_enabled
end

#scopeObject

Returns the value of attribute scope.



8
9
10
# File 'lib/kinde_sdk/configuration.rb', line 8

def scope
  @scope
end

#token_urlObject

Returns the value of attribute token_url.



11
12
13
# File 'lib/kinde_sdk/configuration.rb', line 11

def token_url
  @token_url
end

Class Method Details

.defaultObject



41
42
43
# File 'lib/kinde_sdk/configuration.rb', line 41

def self.default
  @@default ||= Configuration.new
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



45
46
47
# File 'lib/kinde_sdk/configuration.rb', line 45

def configure
  yield(self) if block_given?
end