Class: LogtoCore::IdTokenClaims

Inherits:
Struct
  • Object
show all
Defined in:
lib/logto/core/index_types.rb

Overview

The claims that are returned in the ID Token.

Instance Attribute Summary collapse

Instance Attribute Details

#at_hash ⇒ String?

The access token hash value.

Returns:

  • (String, nil) —

    the current value of at_hash



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def at_hash
  @at_hash
end

#aud ⇒ String

The audience (client ID) of this token.

Returns:

  • (String) —

    the current value of aud



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def aud
  @aud
end

#email ⇒ String?

The email address of the user.

Returns:

  • (String, nil) —

    the current value of email



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def email
  @email
end

#email_verified ⇒ Boolean

Whether the user's email address has been verified.

Returns:

  • (Boolean) —

    the current value of email_verified



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def email_verified
  @email_verified
end

#exp ⇒ Integer

The expiration time of this token.

Returns:

  • (Integer) —

    the current value of exp



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def exp
  @exp
end

#iat ⇒ Integer

The time at which this token was issued.

Returns:

  • (Integer) —

    the current value of iat



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def iat
  @iat
end

#iss ⇒ String

The issuer of this token.

Returns:

  • (String) —

    the current value of iss



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def iss
  @iss
end

#name ⇒ String?

The full name of the user.

Returns:

  • (String, nil) —

    the current value of name



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def name
  @name
end

#organization_roles ⇒ Array<String>

All organization roles that the user has. The format is [organizationId]:[roleName].

Note that not all organizations are included in this list, only the ones that the user has roles in.

Examples:

['org1:admin', 'org2:member'] # The user is an admin of org1 and a member of org2.

Returns:

  • (Array<String>) —

    the current value of organization_roles



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def organization_roles
  @organization_roles
end

#organizations ⇒ Array<String>

The organization IDs that the user has membership in.

Returns:

  • (Array<String>) —

    the current value of organizations



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def organizations
  @organizations
end

#phone_number ⇒ String?

The phone number of the user.

Returns:

  • (String, nil) —

    the current value of phone_number



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def phone_number
  @phone_number
end

#phone_number_verified ⇒ Boolean

Whether the user's phone number has been verified.

Returns:

  • (Boolean) —

    the current value of phone_number_verified



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def phone_number_verified
  @phone_number_verified
end

#picture ⇒ String?

The URL of the user's profile picture.

Returns:

  • (String, nil) —

    the current value of picture



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def picture
  @picture
end

#roles ⇒ Array<String>

The roles that the user has for API resources.

Returns:

  • (Array<String>) —

    the current value of roles



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def roles
  @roles
end

#sub ⇒ String

The subject (user ID) of this token.

Returns:

  • (String) —

    the current value of sub



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def sub
  @sub
end

#unknown_keys ⇒ Object

Returns the value of attribute unknown_keys

Returns:

  • (Object) —

    the current value of unknown_keys



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def unknown_keys
  @unknown_keys
end

#username ⇒ String?

The username of the user.

Returns:

  • (String, nil) —

    the current value of username



54
55
56
# File 'lib/logto/core/index_types.rb', line 54

def username
  @username
end