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.2.1'.freeze
Class Attribute Summary collapse
-
.auth_server_url ⇒ Object
Returns the value of attribute auth_server_url.
-
.generate_request_exception ⇒ Object
Returns the value of attribute generate_request_exception.
-
.keycloak_controller ⇒ Object
Returns the value of attribute keycloak_controller.
-
.proc_cookie_token ⇒ Object
Returns the value of attribute proc_cookie_token.
-
.proc_external_attributes ⇒ Object
Returns the value of attribute proc_external_attributes.
-
.proxy ⇒ Object
Returns the value of attribute proxy.
-
.realm ⇒ Object
Returns the value of attribute realm.
-
.resource ⇒ Object
Returns the value of attribute resource.
-
.secret ⇒ Object
Returns the value of attribute secret.
-
.validate_token_when_call_has_role ⇒ Object
Returns the value of attribute validate_token_when_call_has_role.
Class Method Summary collapse
Class Attribute Details
.auth_server_url ⇒ Object
Returns the value of attribute auth_server_url.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def auth_server_url @auth_server_url end |
.generate_request_exception ⇒ Object
Returns the value of attribute generate_request_exception.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def generate_request_exception @generate_request_exception end |
.keycloak_controller ⇒ Object
Returns the value of attribute keycloak_controller.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def keycloak_controller @keycloak_controller end |
.proc_cookie_token ⇒ Object
Returns the value of attribute proc_cookie_token.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def @proc_cookie_token end |
.proc_external_attributes ⇒ Object
Returns the value of attribute proc_external_attributes.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def proc_external_attributes @proc_external_attributes end |
.proxy ⇒ Object
Returns the value of attribute proxy.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def proxy @proxy end |
.realm ⇒ Object
Returns the value of attribute realm.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def realm @realm end |
.resource ⇒ Object
Returns the value of attribute resource.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def resource @resource end |
.secret ⇒ Object
Returns the value of attribute secret.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def secret @secret end |
.validate_token_when_call_has_role ⇒ Object
Returns the value of attribute validate_token_when_call_has_role.
19 20 21 |
# File 'lib/keycloak.rb', line 19 def validate_token_when_call_has_role @validate_token_when_call_has_role end |
Class Method Details
.explode_exception ⇒ Object
25 26 27 28 |
# File 'lib/keycloak.rb', line 25 def self.explode_exception Keycloak.generate_request_exception = true if Keycloak.generate_request_exception.nil? Keycloak.generate_request_exception end |
.installation_file ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/keycloak.rb', line 30 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
38 39 40 41 |
# File 'lib/keycloak.rb', line 38 def self.installation_file=(file = nil) raise InstallationFileNotFound unless file.instance_of?(String) && File.exist?(file) @installation_file = file || KEYCLOAK_JSON_FILE end |