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

#access ⇒ Object

Returns the value of attribute access.



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

def access
  @access
end

#always_display_in_console ⇒ Object

Returns the value of attribute always_display_in_console.



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

def always_display_in_console
  @always_display_in_console
end

#attributes ⇒ Object

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

#authentication_flow_binding_overrides ⇒ Object

Returns the value of attribute authentication_flow_binding_overrides.



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

def authentication_flow_binding_overrides
  @authentication_flow_binding_overrides
end

#authorization_services_enabled ⇒ Object

Returns the value of attribute authorization_services_enabled.



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

def authorization_services_enabled
  @authorization_services_enabled
end

#base_url ⇒ Object

Returns the value of attribute base_url.



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

def base_url
  @base_url
end

#bearer_only ⇒ Object

Returns the value of attribute bearer_only.



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

def bearer_only
  @bearer_only
end

#client_authenticator_type ⇒ Object

Returns the value of attribute client_authenticator_type.



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

def client_authenticator_type
  @client_authenticator_type
end

#client_id ⇒ Object

Returns the value of attribute client_id.



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

def client_id
  @client_id
end

Returns the value of attribute consent_required.



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

def consent_required
  @consent_required
end

#default_client_scopes ⇒ Object

Returns the value of attribute default_client_scopes.



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

def default_client_scopes
  @default_client_scopes
end

#description ⇒ Object

Returns the value of attribute description.



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

def description
  @description
end

#direct_access_grants_enabled ⇒ Object

Returns the value of attribute direct_access_grants_enabled.



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

def direct_access_grants_enabled
  @direct_access_grants_enabled
end

#frontchannel_logout ⇒ Object

Returns the value of attribute frontchannel_logout.



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

def frontchannel_logout
  @frontchannel_logout
end

#full_scope_allowed ⇒ Object

Returns the value of attribute full_scope_allowed.



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

def full_scope_allowed
  @full_scope_allowed
end

#id ⇒ Object

Returns the value of attribute id.



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

def id
  @id
end

#implicit_flow_enabled ⇒ Object

Returns the value of attribute implicit_flow_enabled.



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

def implicit_flow_enabled
  @implicit_flow_enabled
end

#name ⇒ Object

Returns the value of attribute name.



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

def name
  @name
end

#node_re_registration_timeout ⇒ Object

Returns the value of attribute node_re_registration_timeout.



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

def node_re_registration_timeout
  @node_re_registration_timeout
end

#not_before ⇒ Object

Returns the value of attribute not_before.



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

def not_before
  @not_before
end

#optional_client_scopes ⇒ Object

Returns the value of attribute optional_client_scopes.



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

def optional_client_scopes
  @optional_client_scopes
end

#protocol ⇒ Object

Returns the value of attribute protocol.



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

def protocol
  @protocol
end

#protocol_mappers ⇒ Object

Returns the value of attribute protocol_mappers.



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

def protocol_mappers
  @protocol_mappers
end

#public_client ⇒ Object

Returns the value of attribute public_client.



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

def public_client
  @public_client
end

#redirect_uris ⇒ Object

Returns the value of attribute redirect_uris.



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

def redirect_uris
  @redirect_uris
end

#root_url ⇒ Object

Returns the value of attribute root_url.



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

def root_url
  @root_url
end

#service_accounts_enabled ⇒ Object

Returns the value of attribute service_accounts_enabled.



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

def service_accounts_enabled
  @service_accounts_enabled
end

#standard_flow_enabled ⇒ Object

Returns the value of attribute standard_flow_enabled.



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

def standard_flow_enabled
  @standard_flow_enabled
end

#surrogate_auth_required ⇒ Object

Returns the value of attribute surrogate_auth_required.



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

def surrogate_auth_required
  @surrogate_auth_required
end

#web_origins ⇒ Object

Returns the value of attribute web_origins.



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

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
# 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"] || []
  client.web_origins                           = hash["webOrigins"] || []
  client.not_before                            = hash["notBefore"] || 0
  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.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