Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AnonymousPrincipal = types.Principal{ ID: -1, UID: types.AnonymousPrincipalUID, Type: enum.PrincipalTypeUser, }
AnonymousPrincipal is an in-memory principal for users with no auth data. Authorizer is in charge of handling anonymous access.
Functions ¶
func IsAnonymousSession ¶
Types ¶
type AccessPermissionMetadata ¶
type AccessPermissionMetadata struct {
AccessPermissions *jwt.SubClaimsAccessPermissions
}
AccessPermissionMetadata contains information about permissions per space.
func (*AccessPermissionMetadata) ImpactsAuthorization ¶
func (m *AccessPermissionMetadata) ImpactsAuthorization() bool
type EmptyMetadata ¶
type EmptyMetadata struct{}
EmptyMetadata represents the state when the auth session doesn't have any extra metadata.
func (*EmptyMetadata) ImpactsAuthorization ¶
func (m *EmptyMetadata) ImpactsAuthorization() bool
type MembershipMetadata ¶
type MembershipMetadata struct {
SpaceID int64
Role enum.MembershipRole
}
MembershipMetadata contains information about an ephemeral membership grant.
func (*MembershipMetadata) ImpactsAuthorization ¶
func (m *MembershipMetadata) ImpactsAuthorization() bool
type Session ¶
type Session struct {
// Principal is the authenticated principal.
Principal types.Principal
// Metadata contains auth related information (access grants, tokenId, sshKeyId, ...)
Metadata Metadata
// SudoUser is the external authenticated principal
SudoUser *types.Principal
// User is the end principal. default to Principal, override if SudoUser exist
User *types.Principal
}
Session contains information of the authenticated principal and auth related metadata.
type TokenMetadata ¶
TokenMetadata contains information about the token that was used during auth.
func (*TokenMetadata) ImpactsAuthorization ¶
func (m *TokenMetadata) ImpactsAuthorization() bool
Click to show internal directories.
Click to hide internal directories.