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_hashString?

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

#audString

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

#emailString?

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_verifiedBoolean

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

#expInteger

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

#iatInteger

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

#issString

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

#nameString?

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_rolesArray<String>

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

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

#organizationsArray<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_numberString?

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_verifiedBoolean

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

#pictureString?

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

#rolesArray<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

#subString

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_keysObject

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

#usernameString?

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