Documentation
¶
Index ¶
- Variables
- type APIHandler
- func (h *APIHandler) BeginPasskeyAuthentication(ctx context.Context, _ contract.BeginPasskeyAuthenticationRequestObject) (contract.BeginPasskeyAuthenticationResponseObject, error)
- func (h *APIHandler) BeginPasskeyRegistration(ctx context.Context, _ contract.BeginPasskeyRegistrationRequestObject) (contract.BeginPasskeyRegistrationResponseObject, error)
- func (h *APIHandler) FinishPasskeyAuthentication(ctx context.Context, request contract.FinishPasskeyAuthenticationRequestObject) (contract.FinishPasskeyAuthenticationResponseObject, error)
- func (h *APIHandler) FinishPasskeyRegistration(ctx context.Context, request contract.FinishPasskeyRegistrationRequestObject) (contract.FinishPasskeyRegistrationResponseObject, error)
- func (h *APIHandler) GetCsrfToken(ctx context.Context, _ contract.GetCsrfTokenRequestObject) (contract.GetCsrfTokenResponseObject, error)
- func (h *APIHandler) GetCurrentOrganization(ctx context.Context, _ contract.GetCurrentOrganizationRequestObject) (contract.GetCurrentOrganizationResponseObject, error)
- func (h *APIHandler) GetCurrentUser(ctx context.Context, _ contract.GetCurrentUserRequestObject) (contract.GetCurrentUserResponseObject, error)
- func (h *APIHandler) GetGoogleLoginOptions(ctx context.Context, _ contract.GetGoogleLoginOptionsRequestObject) (contract.GetGoogleLoginOptionsResponseObject, error)
- func (h *APIHandler) ListCurrentOrganizationMembers(ctx context.Context, _ contract.ListCurrentOrganizationMembersRequestObject) (contract.ListCurrentOrganizationMembersResponseObject, error)
- func (h *APIHandler) ListCurrentUserOrganizations(ctx context.Context, _ contract.ListCurrentUserOrganizationsRequestObject) (contract.ListCurrentUserOrganizationsResponseObject, error)
- func (h *APIHandler) LoginWithGoogle(ctx context.Context, request contract.LoginWithGoogleRequestObject) (contract.LoginWithGoogleResponseObject, error)
- func (h *APIHandler) LoginWithPassword(ctx context.Context, request contract.LoginWithPasswordRequestObject) (contract.LoginWithPasswordResponseObject, error)
- func (h *APIHandler) Logout(ctx context.Context, _ contract.LogoutRequestObject) (contract.LogoutResponseObject, error)
- func (h *APIHandler) RefreshSession(ctx context.Context, request contract.RefreshSessionRequestObject) (contract.RefreshSessionResponseObject, error)
- func (h *APIHandler) RefreshTokens(ctx context.Context, request contract.RefreshTokensRequestObject) (contract.RefreshTokensResponseObject, error)
- func (h *APIHandler) ResendChallenge(ctx context.Context, request contract.ResendChallengeRequestObject) (contract.ResendChallengeResponseObject, error)
- func (h *APIHandler) SetCurrentUserPassword(ctx context.Context, request contract.SetCurrentUserPasswordRequestObject) (contract.SetCurrentUserPasswordResponseObject, error)
- func (h *APIHandler) SignupDirect(ctx context.Context, request contract.SignupDirectRequestObject) (contract.SignupDirectResponseObject, error)
- func (h *APIHandler) StartPasswordResetChallenge(ctx context.Context, request contract.StartPasswordResetChallengeRequestObject) (contract.StartPasswordResetChallengeResponseObject, error)
- func (h *APIHandler) StartSignupChallenge(ctx context.Context, request contract.StartSignupChallengeRequestObject) (contract.StartSignupChallengeResponseObject, error)
- func (h *APIHandler) SwitchOrganization(ctx context.Context, request contract.SwitchOrganizationRequestObject) (contract.SwitchOrganizationResponseObject, error)
- func (h *APIHandler) VerifyPasswordResetChallenge(ctx context.Context, ...) (contract.VerifyPasswordResetChallengeResponseObject, error)
- func (h *APIHandler) VerifySignupChallenge(ctx context.Context, request contract.VerifySignupChallengeRequestObject) (contract.VerifySignupChallengeResponseObject, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GetCsrfTokenErrors = contract.MustOperationErrors("getCsrfToken") GetGoogleLoginOptionsErrors = contract.MustOperationErrors("getGoogleLoginOptions") LoginWithGoogleErrors = contract.MustOperationErrors("loginWithGoogle") LoginWithPasswordErrors = contract.MustOperationErrors("loginWithPassword") SignupDirectErrors = contract.MustOperationErrors("signupDirect") StartSignupChallengeErrors = contract.MustOperationErrors("startSignupChallenge") VerifySignupChallengeErrors = contract.MustOperationErrors("verifySignupChallenge") StartPasswordResetChallengeErrors = contract.MustOperationErrors("startPasswordResetChallenge") VerifyPasswordResetChallengeErrors = contract.MustOperationErrors("verifyPasswordResetChallenge") ResendChallengeErrors = contract.MustOperationErrors("resendChallenge") BeginPasskeyAuthenticationErrors = contract.MustOperationErrors("beginPasskeyAuthentication") FinishPasskeyAuthenticationErrors = contract.MustOperationErrors("finishPasskeyAuthentication") BeginPasskeyRegistrationErrors = contract.MustOperationErrors("beginPasskeyRegistration") FinishPasskeyRegistrationErrors = contract.MustOperationErrors("finishPasskeyRegistration") LogoutErrors = contract.MustOperationErrors("logout") RefreshSessionErrors = contract.MustOperationErrors("refreshSession") RefreshTokensErrors = contract.MustOperationErrors("refreshTokens") GetCurrentUserErrors = contract.MustOperationErrors("getCurrentUser") SetCurrentUserPasswordErrors = contract.MustOperationErrors("setCurrentUserPassword") ListCurrentUserOrganizationsErrors = contract.MustOperationErrors("listCurrentUserOrganizations") GetCurrentOrganizationErrors = contract.MustOperationErrors("getCurrentOrganization") ListCurrentOrganizationMembersErrors = contract.MustOperationErrors("listCurrentOrganizationMembers") SwitchOrganizationErrors = contract.MustOperationErrors("switchOrganization") )
Functions ¶
This section is empty.
Types ¶
type APIHandler ¶
type APIHandler struct {
Auth *auth.Service
Passkeys *passkey.Service
Session *session.Service
Organizations *organization.Service
Challenge *challenge.Service
Verification *challenge.VerificationCodeService
Limiter ratelimiter.AuthLimiter
Logger *slog.Logger
Google *google.Client
OAuthProviders oauth.OAuthProviders
ChallengeEnabled bool
AccessTTL time.Duration
RefreshTTL time.Duration
}
func New ¶
func New( auth *auth.Service, passkeys *passkey.Service, session *session.Service, organizations *organization.Service, challenge *challenge.Service, verification *challenge.VerificationCodeService, limiter ratelimiter.AuthLimiter, logger *slog.Logger, google *google.Client, oauthProviders oauth.OAuthProviders, challengeEnabled bool, accessTTL time.Duration, refreshTTL time.Duration, ) *APIHandler
func (*APIHandler) BeginPasskeyAuthentication ¶ added in v0.10.0
func (h *APIHandler) BeginPasskeyAuthentication(ctx context.Context, _ contract.BeginPasskeyAuthenticationRequestObject) (contract.BeginPasskeyAuthenticationResponseObject, error)
func (*APIHandler) BeginPasskeyRegistration ¶ added in v0.10.0
func (h *APIHandler) BeginPasskeyRegistration(ctx context.Context, _ contract.BeginPasskeyRegistrationRequestObject) (contract.BeginPasskeyRegistrationResponseObject, error)
func (*APIHandler) FinishPasskeyAuthentication ¶ added in v0.10.0
func (h *APIHandler) FinishPasskeyAuthentication(ctx context.Context, request contract.FinishPasskeyAuthenticationRequestObject) (contract.FinishPasskeyAuthenticationResponseObject, error)
func (*APIHandler) FinishPasskeyRegistration ¶ added in v0.10.0
func (h *APIHandler) FinishPasskeyRegistration(ctx context.Context, request contract.FinishPasskeyRegistrationRequestObject) (contract.FinishPasskeyRegistrationResponseObject, error)
func (*APIHandler) GetCsrfToken ¶ added in v0.10.0
func (h *APIHandler) GetCsrfToken(ctx context.Context, _ contract.GetCsrfTokenRequestObject) (contract.GetCsrfTokenResponseObject, error)
func (*APIHandler) GetCurrentOrganization ¶ added in v0.10.0
func (h *APIHandler) GetCurrentOrganization(ctx context.Context, _ contract.GetCurrentOrganizationRequestObject) (contract.GetCurrentOrganizationResponseObject, error)
func (*APIHandler) GetCurrentUser ¶ added in v0.10.0
func (h *APIHandler) GetCurrentUser(ctx context.Context, _ contract.GetCurrentUserRequestObject) (contract.GetCurrentUserResponseObject, error)
func (*APIHandler) GetGoogleLoginOptions ¶ added in v0.10.0
func (h *APIHandler) GetGoogleLoginOptions(ctx context.Context, _ contract.GetGoogleLoginOptionsRequestObject) (contract.GetGoogleLoginOptionsResponseObject, error)
func (*APIHandler) ListCurrentOrganizationMembers ¶ added in v0.10.0
func (h *APIHandler) ListCurrentOrganizationMembers(ctx context.Context, _ contract.ListCurrentOrganizationMembersRequestObject) (contract.ListCurrentOrganizationMembersResponseObject, error)
func (*APIHandler) ListCurrentUserOrganizations ¶ added in v0.10.0
func (h *APIHandler) ListCurrentUserOrganizations(ctx context.Context, _ contract.ListCurrentUserOrganizationsRequestObject) (contract.ListCurrentUserOrganizationsResponseObject, error)
func (*APIHandler) LoginWithGoogle ¶ added in v0.10.0
func (h *APIHandler) LoginWithGoogle(ctx context.Context, request contract.LoginWithGoogleRequestObject) (contract.LoginWithGoogleResponseObject, error)
func (*APIHandler) LoginWithPassword ¶ added in v0.10.0
func (h *APIHandler) LoginWithPassword(ctx context.Context, request contract.LoginWithPasswordRequestObject) (contract.LoginWithPasswordResponseObject, error)
func (*APIHandler) Logout ¶ added in v0.10.0
func (h *APIHandler) Logout(ctx context.Context, _ contract.LogoutRequestObject) (contract.LogoutResponseObject, error)
func (*APIHandler) RefreshSession ¶ added in v0.10.0
func (h *APIHandler) RefreshSession(ctx context.Context, request contract.RefreshSessionRequestObject) (contract.RefreshSessionResponseObject, error)
func (*APIHandler) RefreshTokens ¶ added in v0.10.0
func (h *APIHandler) RefreshTokens(ctx context.Context, request contract.RefreshTokensRequestObject) (contract.RefreshTokensResponseObject, error)
func (*APIHandler) ResendChallenge ¶ added in v0.10.0
func (h *APIHandler) ResendChallenge(ctx context.Context, request contract.ResendChallengeRequestObject) (contract.ResendChallengeResponseObject, error)
func (*APIHandler) SetCurrentUserPassword ¶ added in v0.12.0
func (h *APIHandler) SetCurrentUserPassword(ctx context.Context, request contract.SetCurrentUserPasswordRequestObject) (contract.SetCurrentUserPasswordResponseObject, error)
func (*APIHandler) SignupDirect ¶ added in v0.10.0
func (h *APIHandler) SignupDirect(ctx context.Context, request contract.SignupDirectRequestObject) (contract.SignupDirectResponseObject, error)
func (*APIHandler) StartPasswordResetChallenge ¶ added in v0.12.0
func (h *APIHandler) StartPasswordResetChallenge(ctx context.Context, request contract.StartPasswordResetChallengeRequestObject) (contract.StartPasswordResetChallengeResponseObject, error)
func (*APIHandler) StartSignupChallenge ¶ added in v0.10.0
func (h *APIHandler) StartSignupChallenge(ctx context.Context, request contract.StartSignupChallengeRequestObject) (contract.StartSignupChallengeResponseObject, error)
func (*APIHandler) SwitchOrganization ¶ added in v0.10.0
func (h *APIHandler) SwitchOrganization(ctx context.Context, request contract.SwitchOrganizationRequestObject) (contract.SwitchOrganizationResponseObject, error)
func (*APIHandler) VerifyPasswordResetChallenge ¶ added in v0.12.0
func (h *APIHandler) VerifyPasswordResetChallenge(ctx context.Context, request contract.VerifyPasswordResetChallengeRequestObject) (contract.VerifyPasswordResetChallengeResponseObject, error)
func (*APIHandler) VerifySignupChallenge ¶ added in v0.10.0
func (h *APIHandler) VerifySignupChallenge(ctx context.Context, request contract.VerifySignupChallengeRequestObject) (contract.VerifySignupChallengeResponseObject, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.