Module: Hydra::Keycloak

Defined in:
lib/hydra/keycloak/urls.rb,
lib/hydra/keycloak/token.rb,
lib/hydra/keycloak/client.rb,
lib/hydra/keycloak/version.rb,
lib/hydra/keycloak/container.rb,
lib/hydra/keycloak/tokens/repo.rb,
lib/hydra/keycloak/code_verifier.rb,
lib/hydra/keycloak/store/gateway.rb,
lib/hydra/keycloak/tokens/gateway.rb,
lib/hydra/keycloak/store/redis_client.rb,
lib/hydra/keycloak/store/memcached_client.rb

Defined Under Namespace

Modules: Mixin, Store, Tokens Classes: Client, ClientCreator, CodeVerifier, ConfigurationError, Container, Token, Urls

Constant Summary collapse

MEMCACHED_SCHEMA =
Dry::Schema.JSON do
  required(:memcached_host).filled(:string)
  required(:memcached_port).filled(:integer)
  required(:memcached_namespace).filled(:string)
end
REDIS_SCHEMA =
Dry::Schema.JSON do
  required(:redis_host).filled(:string)
  required(:redis_port).filled(:integer)
end
CONFIG_SCHEMA =
Dry::Schema.JSON do
  required(:auth_server_url).filled(:string)
  required(:realm).filled(:string)
  required(:client_id).filled(:string)
  required(:redirect_uri).filled(:string)
  required(:secret).filled(:string)
  required(:logout_redirect).filled(:string)
  required(:store_client).value(included_in?: %w[redis memcached])
  required(:store_client_options).hash(MEMCACHED_SCHEMA | REDIS_SCHEMA)
  optional(:scope).array(:str?)
end
VERSION =
'0.1.19'
Import =
Dry::AutoInject(Container)

Class Method Summary collapse

Class Method Details

.args_inject(target) ⇒ Object



37
38
39
# File 'lib/hydra/keycloak/container.rb', line 37

def args_inject(target)
  ->(*values) { target.send(:include, Import.args[*values]) }
end

.inject(target) ⇒ Object



33
34
35
# File 'lib/hydra/keycloak/container.rb', line 33

def inject(target)
  ->(*values) { target.send(:include, Import[*values]) }
end