Module: Keycloak

Defined in:
lib/keycloak.rb,
lib/keycloak/version.rb,
lib/keycloak/exceptions.rb,
lib/generators/keycloak/config/config_generator.rb

Defined Under Namespace

Modules: Admin, Client, Generators, Internal Classes: InstallationFileNotFound, KeycloakException, ProcCookieTokenNotDefined, ProcExternalAttributesNotDefined, UserLoginNotFound

Constant Summary collapse

OLD_KEYCLOAK_JSON_FILE =
'keycloak.json'.freeze
KEYCLOAK_JSON_FILE =
'config/keycloak.json'.freeze
VERSION =
'3.1.0'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.auth_server_urlObject

Returns the value of attribute auth_server_url.



17
18
19
# File 'lib/keycloak.rb', line 17

def auth_server_url
  @auth_server_url
end

.generate_request_exceptionObject

Returns the value of attribute generate_request_exception.



17
18
19
# File 'lib/keycloak.rb', line 17

def generate_request_exception
  @generate_request_exception
end

.keycloak_controllerObject

Returns the value of attribute keycloak_controller.



17
18
19
# File 'lib/keycloak.rb', line 17

def keycloak_controller
  @keycloak_controller
end

Returns the value of attribute proc_cookie_token.



17
18
19
# File 'lib/keycloak.rb', line 17

def proc_cookie_token
  @proc_cookie_token
end

.proc_external_attributesObject

Returns the value of attribute proc_external_attributes.



17
18
19
# File 'lib/keycloak.rb', line 17

def proc_external_attributes
  @proc_external_attributes
end

.proxyObject

Returns the value of attribute proxy.



17
18
19
# File 'lib/keycloak.rb', line 17

def proxy
  @proxy
end

.realmObject

Returns the value of attribute realm.



17
18
19
# File 'lib/keycloak.rb', line 17

def realm
  @realm
end

.validate_token_when_call_has_roleObject

Returns the value of attribute validate_token_when_call_has_role.



17
18
19
# File 'lib/keycloak.rb', line 17

def validate_token_when_call_has_role
  @validate_token_when_call_has_role
end

Class Method Details

.explode_exceptionObject



22
23
24
25
# File 'lib/keycloak.rb', line 22

def self.explode_exception
  Keycloak.generate_request_exception = true if Keycloak.generate_request_exception.nil?
  Keycloak.generate_request_exception
end

.installation_fileObject



27
28
29
30
31
32
33
# File 'lib/keycloak.rb', line 27

def self.installation_file
  @installation_file ||= if File.exist?(KEYCLOAK_JSON_FILE)
                           KEYCLOAK_JSON_FILE
                         else
                           OLD_KEYCLOAK_JSON_FILE
                         end
end

.installation_file=(file = nil) ⇒ Object



35
36
37
38
# File 'lib/keycloak.rb', line 35

def self.installation_file=(file = nil)
  raise InstallationFileNotFound unless file.instance_of?(String) && File.exist?(file)
  @installation_file = file || KEYCLOAK_JSON_FILE
end