Class: KeycloakAdmin::ClientRepresentation

Inherits:
Representation show all
Defined in:
lib/keycloak-admin/representation/client_representation.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Representation

#as_json, from_json, #to_json

Methods included from CamelJson

#camelize

Instance Attribute Details

#accessObject

Returns the value of attribute access.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def access
  @access
end

#always_display_in_consoleObject

Returns the value of attribute always_display_in_console.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def always_display_in_console
  @always_display_in_console
end

#attributesObject

Returns the value of attribute attributes.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def attributes
  @attributes
end

#authentication_flow_binding_overridesObject

Returns the value of attribute authentication_flow_binding_overrides.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def authentication_flow_binding_overrides
  @authentication_flow_binding_overrides
end

#authorization_services_enabledObject

Returns the value of attribute authorization_services_enabled.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def authorization_services_enabled
  @authorization_services_enabled
end

#base_urlObject

Returns the value of attribute base_url.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def base_url
  @base_url
end

#bearer_onlyObject

Returns the value of attribute bearer_only.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def bearer_only
  @bearer_only
end

#client_authenticator_typeObject

Returns the value of attribute client_authenticator_type.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def client_authenticator_type
  @client_authenticator_type
end

#client_idObject

Returns the value of attribute client_id.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def client_id
  @client_id
end

Returns the value of attribute consent_required.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def consent_required
  @consent_required
end

#default_client_scopesObject

Returns the value of attribute default_client_scopes.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def default_client_scopes
  @default_client_scopes
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def description
  @description
end

#direct_access_grants_enabledObject

Returns the value of attribute direct_access_grants_enabled.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def direct_access_grants_enabled
  @direct_access_grants_enabled
end

#frontchannel_logoutObject

Returns the value of attribute frontchannel_logout.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def frontchannel_logout
  @frontchannel_logout
end

#full_scope_allowedObject

Returns the value of attribute full_scope_allowed.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def full_scope_allowed
  @full_scope_allowed
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def id
  @id
end

#implicit_flow_enabledObject

Returns the value of attribute implicit_flow_enabled.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def implicit_flow_enabled
  @implicit_flow_enabled
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def name
  @name
end

#node_re_registration_timeoutObject

Returns the value of attribute node_re_registration_timeout.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def node_re_registration_timeout
  @node_re_registration_timeout
end

#not_beforeObject

Returns the value of attribute not_before.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def not_before
  @not_before
end

#optional_client_scopesObject

Returns the value of attribute optional_client_scopes.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def optional_client_scopes
  @optional_client_scopes
end

#protocolObject

Returns the value of attribute protocol.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def protocol
  @protocol
end

#protocol_mappersObject

Returns the value of attribute protocol_mappers.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def protocol_mappers
  @protocol_mappers
end

#public_clientObject

Returns the value of attribute public_client.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def public_client
  @public_client
end

#redirect_urisObject

Returns the value of attribute redirect_uris.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def redirect_uris
  @redirect_uris
end

#root_urlObject

Returns the value of attribute root_url.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def root_url
  @root_url
end

#service_accounts_enabledObject

Returns the value of attribute service_accounts_enabled.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def service_accounts_enabled
  @service_accounts_enabled
end

#standard_flow_enabledObject

Returns the value of attribute standard_flow_enabled.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def standard_flow_enabled
  @standard_flow_enabled
end

#surrogate_auth_requiredObject

Returns the value of attribute surrogate_auth_required.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def surrogate_auth_required
  @surrogate_auth_required
end

#web_originsObject

Returns the value of attribute web_origins.



3
4
5
# File 'lib/keycloak-admin/representation/client_representation.rb', line 3

def web_origins
  @web_origins
end

Class Method Details

.from_hash(hash) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/keycloak-admin/representation/client_representation.rb', line 35

def self.from_hash(hash)
  client                                       = new
  client.id                                    = hash["id"]
  client.name                                  = hash["name"]
  client.client_id                             = hash["clientId"]
  client.description                           = hash["description"]
  client.client_authenticator_type             = hash["clientAuthenticatorType"]
  client.always_display_in_console             = hash["alwaysDisplayInConsole"] || false
  client.surrogate_auth_required               = hash["surrogateAuthRequired"] || false
  client.redirect_uris                         = hash["redirectUris"] || false
  client.web_origins                           = hash["webOrigins"] || false
  client.not_before                            = hash["notBefore"] || false
  client.bearer_only                           = hash["bearerOnly"] || false
  client.consent_required                      = hash["consentRequired"] || false
  client.standard_flow_enabled                 = hash["standardFlowEnabled"] || false
  client.implicit_flow_enabled                 = hash["implicitFlowEnabled"] || false
  client.direct_access_grants_enabled          = hash["directAccessGrantsEnabled"] || false
  client.service_accounts_enabled              = hash["serviceAccountsEnabled"] || false
  client.authorization_services_enabled        = hash["authorizationServicesEnabled"] || false
  client.public_client                         = hash["publicClient"] || false
  client.frontchannel_logout                   = hash["frontchannelLogout"] || false
  client.protocol                              = hash["protocol"]
  client.base_url                              = hash["baseUrl"]
  client.root_url                              = hash["rootUrl"]
  client.attributes                            = hash["attributes"] || {}
  client.authentication_flow_binding_overrides = hash["authenticationFlowBindingOverrides"] || {}
  client.full_scope_allowed                    = hash["fullScopeAllowed"] || false
  client.node_re_registration_timeout          = hash["nodeReRegistrationTimeout"] || -1
  client.attributes                            = hash["attributes"]
  client.protocol_mappers                      = (hash["protocolMappers"] || []).map { |protocol_mapper_hash| ProtocolMapperRepresentation.from_hash(protocol_mapper_hash) }
  client.default_client_scopes                 = hash["defaultClientScopes"] || []
  client.optional_client_scopes                = hash["optionalClientScopes"] || []
  client.access                                = hash["access"] || {}
  client
end