Module: Keycloak
- Defined in:
- lib/keycloak-api-rails.rb,
lib/keycloak-api-rails/helper.rb,
lib/keycloak-api-rails/railtie.rb,
lib/keycloak-api-rails/service.rb,
lib/keycloak-api-rails/version.rb,
lib/keycloak-api-rails/middleware.rb,
lib/keycloak-api-rails/http_client.rb,
lib/keycloak-api-rails/configuration.rb,
lib/keycloak-api-rails/authentication.rb,
lib/keycloak-api-rails/public_key_resolver.rb,
lib/keycloak-api-rails/public_key_cached_resolver.rb
Defined Under Namespace
Modules: Authentication
Classes: Configuration, HTTPClient, Helper, Middleware, PublicKeyCachedResolver, PublicKeyResolver, Railtie, Service
Constant Summary
collapse
- VERSION =
"0.12.4"
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
24
25
26
|
# File 'lib/keycloak-api-rails.rb', line 24
def self.config
@configuration
end
|
20
21
22
|
# File 'lib/keycloak-api-rails.rb', line 20
def self.configure
yield @configuration ||= Keycloak::Configuration.new
end
|
.http_client ⇒ Object
28
29
30
|
# File 'lib/keycloak-api-rails.rb', line 28
def self.http_client
@http_client ||= Keycloak::HTTPClient.new(config, logger)
end
|
.load_configuration ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/keycloak-api-rails.rb', line 44
def self.load_configuration
configure do |config|
config.server_url = nil
config.realm_id = nil
config.logger = ::Logger.new(STDOUT)
config.skip_paths = {}
config.opt_in = false
config.token_expiration_tolerance_in_seconds = 10
config.public_key_cache_ttl = 86400
config.custom_attributes = []
end
end
|
.logger ⇒ Object
40
41
42
|
# File 'lib/keycloak-api-rails.rb', line 40
def self.logger
config.logger
end
|
.public_key_resolver ⇒ Object
.service ⇒ Object
36
37
38
|
# File 'lib/keycloak-api-rails.rb', line 36
def self.service
@service ||= Keycloak::Service.new(public_key_resolver)
end
|