SecurityPrincipal
¶
A minimal representation of a security principal.
data class SecurityPrincipal(
val username: String,
val role: Role,
val firstName: String,
val lastName: String,
val email: String?,
val twoFactorAuthentication: Boolean?,
val principalType: String?,
val serviceAgreementAccepted: Boolean?,
val organization: String?,
)
More information can be gathered from an auth service, using the username as a key.
Properties
username
: String
The unique username of this security principal.
String
This is usually suitable for display in UIs.
role
: Role
The role of the security principal
Role
firstName
: String
The first name of the security principal. Can be empty.
String
lastName
: String
The last name of the security principal. Can be empty.
String
email
: String?
The email of the user
String?
twoFactorAuthentication
: Boolean?
A boolean flag indicating if the user has 2FA enabled for their user.
Boolean?
If the token does not contain this information (old tokens generated before field’s introduction) then this will
be set to true
. This is done to avoid breaking extended tokens. This behavior will should change in a
future update.
All new tokens should contain this information explicitly.
principalType
: String?
String?
serviceAgreementAccepted
: Boolean?
A boolean indicating if the service agreement has been accepted
Boolean?
organization
: String?
String?