39 lines
734 B
Go
39 lines
734 B
Go
package identity
|
|
|
|
type CreatorCredentials struct {
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
type CreatorAccount struct {
|
|
Username string
|
|
ActorID ActorID
|
|
PrincipalID PrincipalID
|
|
PasswordHash string
|
|
Revision int64
|
|
}
|
|
|
|
type CreatorSession struct {
|
|
ActorID ActorID
|
|
PrincipalID PrincipalID
|
|
PrincipalKind PrincipalKind
|
|
ExpiresAtUnix int64
|
|
}
|
|
|
|
type PrincipalKind string
|
|
|
|
const (
|
|
PrincipalKindHuman PrincipalKind = "HUMAN"
|
|
PrincipalKindService PrincipalKind = "SERVICE"
|
|
)
|
|
|
|
type ServicePrincipal struct {
|
|
ActorID ActorID
|
|
PrincipalID PrincipalID
|
|
Kind PrincipalKind
|
|
Purpose string
|
|
SyntheticScope string
|
|
Active bool
|
|
Revision int64
|
|
}
|