Documentation
¶
Index ¶
- Variables
- func GetSecurityClaims(ctx context.Context) (*models.AccessTokenClaims, error)
- func RequireUserID(ctx context.Context) (uuid.UUID, error)
- type API
- func (api *API) CheckSession(ctx context.Context) (codegen.CheckSessionRes, error)
- func (api *API) CreateAnonSession(ctx context.Context) (codegen.CreateAnonSessionRes, error)
- func (api *API) CreateRefreshToken(ctx context.Context) (codegen.CreateRefreshTokenRes, error)
- func (api *API) CreateSession(ctx context.Context, req *codegen.LoginForm) (codegen.CreateSessionRes, error)
- func (api *API) EmailExists(ctx context.Context, params codegen.EmailExistsParams) (codegen.EmailExistsRes, error)
- func (api *API) GetPublicKey(ctx context.Context, params codegen.GetPublicKeyParams) (codegen.GetPublicKeyRes, error)
- func (api *API) Healthcheck(ctx context.Context) (codegen.HealthcheckRes, error)
- func (api *API) ListPublicKeys(ctx context.Context, params codegen.ListPublicKeysParams) (codegen.ListPublicKeysRes, error)
- func (api *API) NewError(ctx context.Context, err error) *codegen.UnexpectedErrorStatusCode
- func (api *API) Ping(_ context.Context) (codegen.PingRes, error)
- func (api *API) RefreshSession(ctx context.Context, params codegen.RefreshSessionParams) (codegen.RefreshSessionRes, error)
- func (api *API) Register(ctx context.Context, req *codegen.RegisterForm) (codegen.RegisterRes, error)
- func (api *API) RequestEmailUpdate(ctx context.Context, req *codegen.RequestEmailUpdateForm) (codegen.RequestEmailUpdateRes, error)
- func (api *API) RequestPasswordReset(ctx context.Context, req *codegen.RequestPasswordResetForm) (codegen.RequestPasswordResetRes, error)
- func (api *API) RequestRegistration(ctx context.Context, req *codegen.RequestRegistrationForm) (codegen.RequestRegistrationRes, error)
- func (api *API) ResetPassword(ctx context.Context, req *codegen.ResetPasswordForm) (codegen.ResetPasswordRes, error)
- func (api *API) UpdateEmail(ctx context.Context, req *codegen.UpdateEmailForm) (codegen.UpdateEmailRes, error)
- func (api *API) UpdatePassword(ctx context.Context, req *codegen.UpdatePasswordForm) (codegen.UpdatePasswordRes, error)
- type ClaimsAPIKey
- type ConsumeRefreshTokenService
- type EmailExistsService
- type IssueRefreshTokenService
- type LoginAnonService
- type LoginService
- type RegisterService
- type RequestEmailUpdateService
- type RequestPasswordResetService
- type RequestRegisterService
- type SearchKeysService
- type SecurityAPI
- type SecurityAPISource
- type SelectKeyService
- type UpdateEmailService
- type UpdatePasswordService
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingUserID = errors.New("claims do not contain user ID")
Functions ¶
func GetSecurityClaims ¶
func GetSecurityClaims(ctx context.Context) (*models.AccessTokenClaims, error)
Types ¶
type API ¶
type API struct { LoginService LoginService LoginAnonService LoginAnonService ConsumeRefreshTokenService ConsumeRefreshTokenService IssueRefreshTokenService IssueRefreshTokenService SelectKeyService SelectKeyService SearchKeysService SearchKeysService RequestEmailUpdateService RequestEmailUpdateService RequestPasswordResetService RequestPasswordResetService RequestRegisterService RequestRegisterService RegisterService RegisterService EmailExistsService EmailExistsService UpdateEmailService UpdateEmailService UpdatePasswordService UpdatePasswordService codegen.UnimplementedHandler }
func (*API) CheckSession ¶
func (*API) CreateAnonSession ¶
func (*API) CreateRefreshToken ¶ added in v0.1.1
func (*API) CreateSession ¶
func (*API) EmailExists ¶
func (api *API) EmailExists(ctx context.Context, params codegen.EmailExistsParams) (codegen.EmailExistsRes, error)
func (*API) GetPublicKey ¶
func (api *API) GetPublicKey(ctx context.Context, params codegen.GetPublicKeyParams) (codegen.GetPublicKeyRes, error)
func (*API) Healthcheck ¶ added in v0.1.1
func (*API) ListPublicKeys ¶
func (api *API) ListPublicKeys( ctx context.Context, params codegen.ListPublicKeysParams, ) (codegen.ListPublicKeysRes, error)
func (*API) RefreshSession ¶ added in v0.1.1
func (api *API) RefreshSession( ctx context.Context, params codegen.RefreshSessionParams, ) (codegen.RefreshSessionRes, error)
func (*API) Register ¶
func (api *API) Register(ctx context.Context, req *codegen.RegisterForm) (codegen.RegisterRes, error)
func (*API) RequestEmailUpdate ¶
func (api *API) RequestEmailUpdate( ctx context.Context, req *codegen.RequestEmailUpdateForm, ) (codegen.RequestEmailUpdateRes, error)
func (*API) RequestPasswordReset ¶
func (api *API) RequestPasswordReset( ctx context.Context, req *codegen.RequestPasswordResetForm, ) (codegen.RequestPasswordResetRes, error)
func (*API) RequestRegistration ¶
func (api *API) RequestRegistration( ctx context.Context, req *codegen.RequestRegistrationForm, ) (codegen.RequestRegistrationRes, error)
func (*API) ResetPassword ¶
func (api *API) ResetPassword(ctx context.Context, req *codegen.ResetPasswordForm) (codegen.ResetPasswordRes, error)
func (*API) UpdateEmail ¶
func (api *API) UpdateEmail(ctx context.Context, req *codegen.UpdateEmailForm) (codegen.UpdateEmailRes, error)
func (*API) UpdatePassword ¶
func (api *API) UpdatePassword( ctx context.Context, req *codegen.UpdatePasswordForm) (codegen.UpdatePasswordRes, error, )
type ClaimsAPIKey ¶
type ClaimsAPIKey struct{}
type ConsumeRefreshTokenService ¶ added in v0.1.1
type EmailExistsService ¶
type IssueRefreshTokenService ¶ added in v0.1.1
type LoginAnonService ¶
type LoginService ¶
type RegisterService ¶
type RequestRegisterService ¶
type SearchKeysService ¶
type SecurityAPI ¶
type SecurityAPI struct { // Permissions required by each operation. RequiredPermissions map[codegen.OperationName][]models.Permission // Permissions granted by each role. GrantedPermissions map[models.Role][]models.Permission SecurityAPISource SecurityAPISource }
func NewSecurity ¶
func NewSecurity( required map[codegen.OperationName][]models.Permission, granted models.PermissionsConfig, service SecurityAPISource, ) (*SecurityAPI, error)
func (*SecurityAPI) HandleBearerAuth ¶
func (security *SecurityAPI) HandleBearerAuth( ctx context.Context, operationName codegen.OperationName, auth codegen.BearerAuth, ) (context.Context, error)
type SecurityAPISource ¶
type SelectKeyService ¶
type UpdateEmailService ¶
type UpdateEmailService interface {
UpdateEmail(ctx context.Context, request services.UpdateEmailRequest) (*services.UpdateEmailResponse, error)
}
type UpdatePasswordService ¶
type UpdatePasswordService interface {
UpdatePassword(ctx context.Context, request services.UpdatePasswordRequest) error
}
Source Files
¶
- api.go
- api_credentials_email_exists.go
- api_credentials_email_update.go
- api_credentials_password_reset.go
- api_credentials_password_update.go
- api_credentials_register.go
- api_health.go
- api_public_keys_get.go
- api_public_keys_list.go
- api_session_check.go
- api_session_create.go
- api_session_create_anon.go
- api_session_create_refresh_token.go
- api_session_refresh_session.go
- api_short_codes_email_update.go
- api_short_codes_password_reset.go
- api_short_codes_register.go
- security.go
Click to show internal directories.
Click to hide internal directories.