Class: KeycloakAdmin::SessionRepresentation

Inherits:
Representation show all
Defined in:
lib/keycloak-admin/representation/session_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

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#ip_addressObject

Returns the value of attribute ip_address.



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

def ip_address
  @ip_address
end

#last_accessObject

Returns the value of attribute last_access.



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

def last_access
  @last_access
end

#remember_meObject

Returns the value of attribute remember_me.



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

def remember_me
  @remember_me
end

#startObject

Returns the value of attribute start.



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

def start
  @start
end

#user_idObject

Returns the value of attribute user_id.



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

def user_id
  @user_id
end

#usernameObject

Returns the value of attribute username.



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

def username
  @username
end

Class Method Details

.from_hash(hash) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/keycloak-admin/representation/session_representation.rb', line 12

def self.from_hash(hash)
  rep                   = new
  rep.id                = hash["id"]
  rep.username          = hash["username"]
  rep.user_id           = hash["userId"]
  rep.ip_address        = hash["ipAddress"]
  rep.start             = hash["start"]
  rep.last_access       = hash["lastAccess"]
  rep.remember_me       = hash["rememberMe"]
  rep
end