Class: KeycloakAdmin::CredentialRepresentation
- Inherits:
-
Representation
- Object
- Representation
- KeycloakAdmin::CredentialRepresentation
- Defined in:
- lib/keycloak-admin/representation/credential_representation.rb
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#config ⇒ Object
Returns the value of attribute config.
-
#counter ⇒ Object
Returns the value of attribute counter.
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#device ⇒ Object
Returns the value of attribute device.
-
#digits ⇒ Object
Returns the value of attribute digits.
-
#hashedSaltedValue ⇒ Object
Returns the value of attribute hashedSaltedValue.
-
#hashIterations ⇒ Object
Returns the value of attribute hashIterations.
-
#period ⇒ Object
Returns the value of attribute period.
-
#salt ⇒ Object
Returns the value of attribute salt.
-
#temporary ⇒ Object
Returns the value of attribute temporary.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
- .from_hash(hash) ⇒ Object
- .from_json(json) ⇒ Object
- .from_password(password, temporary = false) ⇒ Object
Methods inherited from Representation
Methods included from CamelJson
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def algorithm @algorithm end |
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def config @config end |
#counter ⇒ Object
Returns the value of attribute counter.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def counter @counter end |
#created_date ⇒ Object
Returns the value of attribute created_date.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def created_date @created_date end |
#device ⇒ Object
Returns the value of attribute device.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def device @device end |
#digits ⇒ Object
Returns the value of attribute digits.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def digits @digits end |
#hashedSaltedValue ⇒ Object
Returns the value of attribute hashedSaltedValue.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def hashedSaltedValue @hashedSaltedValue end |
#hashIterations ⇒ Object
Returns the value of attribute hashIterations.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def hashIterations @hashIterations end |
#period ⇒ Object
Returns the value of attribute period.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def period @period end |
#salt ⇒ Object
Returns the value of attribute salt.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def salt @salt end |
#temporary ⇒ Object
Returns the value of attribute temporary.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def temporary @temporary end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 3 def value @value end |
Class Method Details
.from_hash(hash) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 30 def self.from_hash(hash) credential = new hash.each do |key, value| property = "@#{key}".to_sym credential.instance_variable_set(property, value) end credential end |
.from_json(json) ⇒ Object
25 26 27 28 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 25 def self.from_json(json) attributes = JSON.parse(json) from_hash(attributes) end |
.from_password(password, temporary = false) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/keycloak-admin/representation/credential_representation.rb', line 17 def self.from_password(password, temporary=false) credential = new credential.value = password credential.type = "password" credential.temporary = temporary credential end |