Documentation
¶
Overview ¶
Package authorityapi serves the built-in authority HTTP API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
NewHandler constructs a standalone HTTP handler for the built-in authority API.
Types ¶
type Config ¶
type Config struct {
ManagedDeploymentDomain string
LoginToken string
AccessTokenLifetime time.Duration
RefreshTokenLifetime time.Duration
DNSAutomation bool
OIDCVerifier oidcauth.Verifier
}
Config contains settings for the built-in authority API.
type Store ¶
type Store interface {
CreateBuiltinControlSession(context.Context, string, int64, time.Duration, time.Duration, time.Time) (controlstate.ControlSession, error)
CreateOIDCControlSession(context.Context, string, controlstate.OIDCIdentity, time.Duration, time.Duration, time.Time) (controlstate.ControlSession, error)
RefreshControlSession(context.Context, credentials.RefreshToken, int64, time.Duration, time.Time) (controlstate.ControlSession, error)
RevokeControlSession(context.Context, controlstate.ControlPrincipal, time.Time) error
AuthenticateAccessToken(context.Context, credentials.AccessToken, int64, time.Time) (controlstate.ControlPrincipal, error)
IdentityContext(context.Context, string) (controlstate.IdentityContext, error)
ListTeams(context.Context, string) ([]controlstate.Team, error)
CreateTeam(context.Context, controlstate.CreateTeamRequest, time.Time) (controlstate.Team, error)
GetTeam(context.Context, string, string) (controlstate.Team, error)
ListTeamMemberships(context.Context, string, string) ([]controlstate.Membership, error)
SetMembershipRole(context.Context, string, string, string, string, time.Time) (controlstate.Membership, error)
RemoveMembership(context.Context, string, string, string, time.Time) error
ListTeamInvitations(context.Context, string, string, time.Time) ([]controlstate.Invitation, error)
CreateTeamInvitation(context.Context, controlstate.CreateInvitationRequest, time.Time) (controlstate.InvitationSecret, error)
RevokeTeamInvitation(context.Context, string, string, string, time.Time) error
AcceptInvitation(context.Context, string, credentials.InvitationToken, time.Time) (controlstate.Membership, error)
ListTeamDomains(context.Context, string, string) ([]controlstate.Domain, error)
ClaimTeamDomain(context.Context, controlstate.ClaimDomainRequest, time.Time) (controlstate.Domain, error)
SetTeamDefaultDomain(context.Context, string, string, string, time.Time) (controlstate.Team, error)
ReleaseTeamDomain(context.Context, string, string, string, time.Time) error
}
Store is the stored state used by the built-in authority API.
Click to show internal directories.
Click to hide internal directories.