Class: KeycloakSdk::IntrospectionResult

Inherits:
Data
  • Object
show all
Defined in:
lib/keycloak_sdk/tokens.rb

Overview

RFC 7662 introspection 결과.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#activeObject (readonly)

Returns the value of attribute active

Returns:

  • (Object)

    the current value of active



38
39
40
# File 'lib/keycloak_sdk/tokens.rb', line 38

def active
  @active
end

#claimsObject (readonly)

Returns the value of attribute claims

Returns:

  • (Object)

    the current value of claims



38
39
40
# File 'lib/keycloak_sdk/tokens.rb', line 38

def claims
  @claims
end

#client_idObject (readonly)

Returns the value of attribute client_id

Returns:

  • (Object)

    the current value of client_id



38
39
40
# File 'lib/keycloak_sdk/tokens.rb', line 38

def client_id
  @client_id
end

#usernameObject (readonly)

Returns the value of attribute username

Returns:

  • (Object)

    the current value of username



38
39
40
# File 'lib/keycloak_sdk/tokens.rb', line 38

def username
  @username
end

Class Method Details

.from_response(body) ⇒ Object



39
40
41
42
# File 'lib/keycloak_sdk/tokens.rb', line 39

def self.from_response(body)
  new(active: body["active"] == true, username: body["username"],
      client_id: body["client_id"], claims: body)
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/keycloak_sdk/tokens.rb', line 44

def active?
  active == true
end