Documentation ¶
Index ¶
- func GetResetPasswordEmail(set *settings.Settings, u *user.User, code string) (*email.Message, error)
- type AccessClaims
- type ProjectClaims
- type RefreshClaims
- type RigClaims
- type Service
- func (s *Service) CreateServiceAccount(ctx context.Context, name string, managed bool) (*service_account.ServiceAccount, string, string, error)
- func (s *Service) DeleteServiceAccount(ctx context.Context, serviceAccountID uuid.UUID) error
- func (s *Service) GetAuthor(ctx context.Context) (*model.Author, error)
- func (s *Service) GetJWTMethod() (jwt.SigningMethod, string)
- func (s *Service) GetOauth2Providers(ctx context.Context, redirect string) ([]*authentication.OauthProvider, error)
- func (s *Service) ListServiceAccounts(ctx context.Context) (iterator.Iterator[*service_account.Entry], error)
- func (s *Service) ListSessions(ctx context.Context, userID uuid.UUID) (iterator.Iterator[*user.SessionEntry], error)
- func (s *Service) LoginClientCredentials(ctx context.Context, clientID, clientSecret string) (*authentication.Token, error)
- func (s *Service) LoginOauth2(ctx context.Context, claims *auth.Oauth2Claims, ...) (*authentication.Token, error)
- func (s *Service) LoginUserPassword(ctx context.Context, id *model.UserIdentifier, pw string) (uuid.UUID, *model.UserInfo, *authentication.Token, error)
- func (s *Service) Logout(ctx context.Context) error
- func (s *Service) RefreshToken(ctx context.Context, oldRefreshToken string) (*authentication.Token, error)
- func (s *Service) ResetPassword(ctx context.Context, identifier *model.UserIdentifier, ...) error
- func (s *Service) SendPasswordReset(ctx context.Context, identifier *model.UserIdentifier) error
- func (s *Service) UseProject(ctx context.Context, projectID uuid.UUID) (string, error)
- func (s *Service) ValidateAccessToken(ctx context.Context, jwtToken string) (*AccessClaims, error)
- func (s *Service) ValidateProjectToken(ctx context.Context, jwtToken string) (*ProjectClaims, error)
- func (s *Service) VerifyEmail(ctx context.Context, email string, code string) error
- func (s *Service) VerifyPhoneNumber(ctx context.Context, email string, code string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessClaims ¶
type AccessClaims struct { Groups []uuid.UUID `json:"gps,omitempty"` MetaData map[string]interface{} `json:"meta_data,omitempty"` RigClaims }
The metadata stored in all access tokens.
type ProjectClaims ¶
type RefreshClaims ¶
The metadata stored in all refresh tokens.
type RigClaims ¶
type RigClaims struct { ProjectID uuid.UUID `json:"pid"` Subject uuid.UUID `json:"sub"` SubjectType auth.SubjectType `json:"sty"` SessionID uuid.UUID `json:"jti,omitempty"` jwt.StandardClaims }
func (RigClaims) GetProjectID ¶
func (RigClaims) GetSessionID ¶
func (RigClaims) GetSubject ¶
func (RigClaims) GetSubjectType ¶
func (c RigClaims) GetSubjectType() auth.SubjectType
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateServiceAccount ¶
func (s *Service) CreateServiceAccount(ctx context.Context, name string, managed bool) (*service_account.ServiceAccount, string, string, error)
func (*Service) DeleteServiceAccount ¶
func (*Service) GetJWTMethod ¶
func (s *Service) GetJWTMethod() (jwt.SigningMethod, string)
func (*Service) GetOauth2Providers ¶
func (s *Service) GetOauth2Providers(ctx context.Context, redirect string) ([]*authentication.OauthProvider, error)
func (*Service) ListServiceAccounts ¶
func (*Service) ListSessions ¶
func (*Service) LoginClientCredentials ¶
func (*Service) LoginOauth2 ¶
func (s *Service) LoginOauth2(ctx context.Context, claims *auth.Oauth2Claims, provider *settings.OauthProviderSettings) (*authentication.Token, error)
func (*Service) LoginUserPassword ¶
func (*Service) RefreshToken ¶
func (*Service) ResetPassword ¶
func (*Service) SendPasswordReset ¶
func (*Service) UseProject ¶
func (*Service) ValidateAccessToken ¶
func (*Service) ValidateProjectToken ¶
func (*Service) VerifyEmail ¶
Click to show internal directories.
Click to hide internal directories.