Documentation
¶
Overview ¶
Package connect provides the Connect-Go RPC handler layer for the identity service. It implements the identityconnect.IdentityServiceHandler interface generated by buf/protoc-gen-connect-go.
The handler is a thin adapter — it extracts request metadata (IP, user agent, authenticated user ID), calls the appropriate service method, and converts service-layer domain types to proto response messages.
Since buf generate has not run yet, the generated proto types (identitypb.*, identityconnect.*) do not exist. This code is written against the EXPECTED interface. The compiler will catch any mismatches when protos are generated.
Expected generated import paths:
identitypb "github.com/elloloop/identity/gen/go/identity/v1" identityconnect "github.com/elloloop/identity/gen/go/identity/v1/identityv1connect"
Index ¶
- type IdentityHandler
- func (h *IdentityHandler) AcceptInvitation(ctx context.Context, req *connect.Request[identitypb.AcceptInvitationRequest]) (*connect.Response[identitypb.AcceptInvitationResponse], error)
- func (h *IdentityHandler) AcceptTenantInvitation(ctx context.Context, ...) (*connect.Response[identitypb.AcceptTenantInvitationResponse], error)
- func (h *IdentityHandler) AddGroupMember(ctx context.Context, req *connect.Request[identitypb.AddGroupMemberRequest]) (*connect.Response[identitypb.AddGroupMemberResponse], error)
- func (h *IdentityHandler) AddProjectAuthDomain(ctx context.Context, ...) (*connect.Response[identitypb.AddProjectAuthDomainResponse], error)
- func (h *IdentityHandler) AdminAddProjectAuthDomain(ctx context.Context, ...) (*connect.Response[identitypb.AdminAddProjectAuthDomainResponse], error)
- func (h *IdentityHandler) AdminAddTenantAdmin(ctx context.Context, ...) (*connect.Response[identitypb.AdminAddTenantAdminResponse], error)
- func (h *IdentityHandler) AdminCreateProject(ctx context.Context, ...) (*connect.Response[identitypb.AdminCreateProjectResponse], error)
- func (h *IdentityHandler) AdminCreateProjectCredential(ctx context.Context, ...) (*connect.Response[identitypb.AdminCreateProjectCredentialResponse], error)
- func (h *IdentityHandler) AdminCreateTenant(ctx context.Context, req *connect.Request[identitypb.AdminCreateTenantRequest]) (*connect.Response[identitypb.AdminCreateTenantResponse], error)
- func (h *IdentityHandler) ApproveQrLogin(ctx context.Context, req *connect.Request[identitypb.ApproveQrLoginRequest]) (*connect.Response[identitypb.ApproveQrLoginResponse], error)
- func (h *IdentityHandler) BeginIdentityVerification(ctx context.Context, ...) (*connect.Response[identitypb.BeginIdentityVerificationResponse], error)
- func (h *IdentityHandler) BeginOAuthLogin(ctx context.Context, req *connect.Request[identitypb.BeginOAuthLoginRequest]) (*connect.Response[identitypb.BeginOAuthLoginResponse], error)
- func (h *IdentityHandler) BeginPasskeyLogin(ctx context.Context, req *connect.Request[identitypb.BeginPasskeyLoginRequest]) (*connect.Response[identitypb.BeginPasskeyLoginResponse], error)
- func (h *IdentityHandler) BeginPasskeyRegistration(ctx context.Context, ...) (*connect.Response[identitypb.BeginPasskeyRegistrationResponse], error)
- func (h *IdentityHandler) BeginPasskeySignup(ctx context.Context, ...) (*connect.Response[identitypb.BeginPasskeySignupResponse], error)
- func (h *IdentityHandler) BeginTotpSetup(ctx context.Context, req *connect.Request[identitypb.BeginTotpSetupRequest]) (*connect.Response[identitypb.BeginTotpSetupResponse], error)
- func (h *IdentityHandler) ChangePassword(ctx context.Context, req *connect.Request[identitypb.ChangePasswordRequest]) (*connect.Response[identitypb.ChangePasswordResponse], error)
- func (h *IdentityHandler) CompletePasskeyLogin(ctx context.Context, ...) (*connect.Response[identitypb.CompletePasskeyLoginResponse], error)
- func (h *IdentityHandler) CompletePasskeyRegistration(ctx context.Context, ...) (*connect.Response[identitypb.CompletePasskeyRegistrationResponse], error)
- func (h *IdentityHandler) CompletePasskeySignup(ctx context.Context, ...) (*connect.Response[identitypb.CompletePasskeySignupResponse], error)
- func (h *IdentityHandler) ConfirmEmailChange(ctx context.Context, ...) (*connect.Response[identitypb.ConfirmEmailChangeResponse], error)
- func (h *IdentityHandler) ConfirmPasswordReset(ctx context.Context, ...) (*connect.Response[identitypb.ConfirmPasswordResetResponse], error)
- func (h *IdentityHandler) CreateDomain(ctx context.Context, req *connect.Request[identitypb.CreateDomainRequest]) (*connect.Response[identitypb.CreateDomainResponse], error)
- func (h *IdentityHandler) CreateFirstPlatformAdmin(ctx context.Context, ...) (*connect.Response[identitypb.CreateFirstPlatformAdminResponse], error)
- func (h *IdentityHandler) CreateGroup(ctx context.Context, req *connect.Request[identitypb.CreateGroupRequest]) (*connect.Response[identitypb.CreateGroupResponse], error)
- func (h *IdentityHandler) CreateTenantInvitation(ctx context.Context, ...) (*connect.Response[identitypb.CreateTenantInvitationResponse], error)
- func (h *IdentityHandler) CreateUser(ctx context.Context, req *connect.Request[identitypb.CreateUserRequest]) (*connect.Response[identitypb.CreateUserResponse], error)
- func (h *IdentityHandler) DeactivateUser(ctx context.Context, req *connect.Request[identitypb.DeactivateUserRequest]) (*connect.Response[identitypb.DeactivateUserResponse], error)
- func (h *IdentityHandler) DeleteGroup(ctx context.Context, req *connect.Request[identitypb.DeleteGroupRequest]) (*connect.Response[identitypb.DeleteGroupResponse], error)
- func (h *IdentityHandler) DeleteLoginPolicy(ctx context.Context, req *connect.Request[identitypb.DeleteLoginPolicyRequest]) (*connect.Response[identitypb.DeleteLoginPolicyResponse], error)
- func (h *IdentityHandler) DeletePasskey(ctx context.Context, req *connect.Request[identitypb.DeletePasskeyRequest]) (*connect.Response[identitypb.DeletePasskeyResponse], error)
- func (h *IdentityHandler) DeleteUser(ctx context.Context, req *connect.Request[identitypb.DeleteUserRequest]) (*connect.Response[identitypb.DeleteUserResponse], error)
- func (h *IdentityHandler) DisableTotp(ctx context.Context, req *connect.Request[identitypb.DisableTotpRequest]) (*connect.Response[identitypb.DisableTotpResponse], error)
- func (h *IdentityHandler) GetCurrentUser(ctx context.Context, req *connect.Request[identitypb.GetCurrentUserRequest]) (*connect.Response[identitypb.GetCurrentUserResponse], error)
- func (h *IdentityHandler) GetIdentityVerificationStatus(ctx context.Context, ...) (*connect.Response[identitypb.GetIdentityVerificationStatusResponse], error)
- func (h *IdentityHandler) GetLoginPolicy(ctx context.Context, req *connect.Request[identitypb.GetLoginPolicyRequest]) (*connect.Response[identitypb.GetLoginPolicyResponse], error)
- func (h *IdentityHandler) GetProjectConfig(ctx context.Context, req *connect.Request[identitypb.GetProjectConfigRequest]) (*connect.Response[identitypb.GetProjectConfigResponse], error)
- func (h *IdentityHandler) GetQrLoginSession(ctx context.Context, req *connect.Request[identitypb.GetQrLoginSessionRequest]) (*connect.Response[identitypb.GetQrLoginSessionResponse], error)
- func (h *IdentityHandler) GetUser(ctx context.Context, req *connect.Request[identitypb.GetUserRequest]) (*connect.Response[identitypb.GetUserResponse], error)
- func (h *IdentityHandler) InitiateQrLogin(ctx context.Context, req *connect.Request[identitypb.InitiateQrLoginRequest]) (*connect.Response[identitypb.InitiateQrLoginResponse], error)
- func (h *IdentityHandler) InviteUser(ctx context.Context, req *connect.Request[identitypb.InviteUserRequest]) (*connect.Response[identitypb.InviteUserResponse], error)
- func (h *IdentityHandler) LinkIdentity(ctx context.Context, req *connect.Request[identitypb.LinkIdentityRequest]) (*connect.Response[identitypb.LinkIdentityResponse], error)
- func (h *IdentityHandler) ListAuditEvents(ctx context.Context, req *connect.Request[identitypb.ListAuditEventsRequest]) (*connect.Response[identitypb.ListAuditEventsResponse], error)
- func (h *IdentityHandler) ListGroupMembers(ctx context.Context, req *connect.Request[identitypb.ListGroupMembersRequest]) (*connect.Response[identitypb.ListGroupMembersResponse], error)
- func (h *IdentityHandler) ListGroups(ctx context.Context, req *connect.Request[identitypb.ListGroupsRequest]) (*connect.Response[identitypb.ListGroupsResponse], error)
- func (h *IdentityHandler) ListHelpRequests(ctx context.Context, req *connect.Request[identitypb.ListHelpRequestsRequest]) (*connect.Response[identitypb.ListHelpRequestsResponse], error)
- func (h *IdentityHandler) ListLinkedIdentities(ctx context.Context, ...) (*connect.Response[identitypb.ListLinkedIdentitiesResponse], error)
- func (h *IdentityHandler) ListMySessions(ctx context.Context, req *connect.Request[identitypb.ListMySessionsRequest]) (*connect.Response[identitypb.ListMySessionsResponse], error)
- func (h *IdentityHandler) ListPasskeys(ctx context.Context, req *connect.Request[identitypb.ListPasskeysRequest]) (*connect.Response[identitypb.ListPasskeysResponse], error)
- func (h *IdentityHandler) ListProjectAuthDomains(ctx context.Context, ...) (*connect.Response[identitypb.ListProjectAuthDomainsResponse], error)
- func (h *IdentityHandler) ListTenantDomains(ctx context.Context, req *connect.Request[identitypb.ListTenantDomainsRequest]) (*connect.Response[identitypb.ListTenantDomainsResponse], error)
- func (h *IdentityHandler) ListTenantInvitations(ctx context.Context, ...) (*connect.Response[identitypb.ListTenantInvitationsResponse], error)
- func (h *IdentityHandler) ListTenantMembers(ctx context.Context, req *connect.Request[identitypb.ListTenantMembersRequest]) (*connect.Response[identitypb.ListTenantMembersResponse], error)
- func (h *IdentityHandler) ListUsers(ctx context.Context, req *connect.Request[identitypb.ListUsersRequest]) (*connect.Response[identitypb.ListUsersResponse], error)
- func (h *IdentityHandler) Logout(ctx context.Context, req *connect.Request[identitypb.LogoutRequest]) (*connect.Response[identitypb.LogoutResponse], error)
- func (h *IdentityHandler) OAuthLogin(ctx context.Context, req *connect.Request[identitypb.OAuthLoginRequest]) (*connect.Response[identitypb.OAuthLoginResponse], error)
- func (h *IdentityHandler) PasswordLogin(ctx context.Context, req *connect.Request[identitypb.PasswordLoginRequest]) (*connect.Response[identitypb.PasswordLoginResponse], error)
- func (h *IdentityHandler) PasswordSignup(ctx context.Context, req *connect.Request[identitypb.PasswordSignupRequest]) (*connect.Response[identitypb.PasswordSignupResponse], error)
- func (h *IdentityHandler) PollQrLogin(ctx context.Context, req *connect.Request[identitypb.PollQrLoginRequest]) (*connect.Response[identitypb.PollQrLoginResponse], error)
- func (h *IdentityHandler) ReactivateUser(ctx context.Context, req *connect.Request[identitypb.ReactivateUserRequest]) (*connect.Response[identitypb.ReactivateUserResponse], error)
- func (h *IdentityHandler) RedeemMagicLink(ctx context.Context, req *connect.Request[identitypb.RedeemMagicLinkRequest]) (*connect.Response[identitypb.RedeemMagicLinkResponse], error)
- func (h *IdentityHandler) RedeemOAuthCode(ctx context.Context, req *connect.Request[identitypb.RedeemOAuthCodeRequest]) (*connect.Response[identitypb.RedeemOAuthCodeResponse], error)
- func (h *IdentityHandler) RefreshToken(ctx context.Context, req *connect.Request[identitypb.RefreshTokenRequest]) (*connect.Response[identitypb.RefreshTokenResponse], error)
- func (h *IdentityHandler) RegenerateRecoveryCodes(ctx context.Context, ...) (*connect.Response[identitypb.RegenerateRecoveryCodesResponse], error)
- func (h *IdentityHandler) RemoveGroupMember(ctx context.Context, req *connect.Request[identitypb.RemoveGroupMemberRequest]) (*connect.Response[identitypb.RemoveGroupMemberResponse], error)
- func (h *IdentityHandler) RemoveTenantMember(ctx context.Context, ...) (*connect.Response[identitypb.RemoveTenantMemberResponse], error)
- func (h *IdentityHandler) RequestAdminHelp(ctx context.Context, req *connect.Request[identitypb.RequestAdminHelpRequest]) (*connect.Response[identitypb.RequestAdminHelpResponse], error)
- func (h *IdentityHandler) RequestEmailChange(ctx context.Context, ...) (*connect.Response[identitypb.RequestEmailChangeResponse], error)
- func (h *IdentityHandler) RequestEmailLoginCode(ctx context.Context, ...) (*connect.Response[identitypb.RequestEmailLoginCodeResponse], error)
- func (h *IdentityHandler) RequestMagicLink(ctx context.Context, req *connect.Request[identitypb.RequestMagicLinkRequest]) (*connect.Response[identitypb.RequestMagicLinkResponse], error)
- func (h *IdentityHandler) RequestPasswordReset(ctx context.Context, ...) (*connect.Response[identitypb.RequestPasswordResetResponse], error)
- func (h *IdentityHandler) RequestPhoneVerification(ctx context.Context, ...) (*connect.Response[identitypb.RequestPhoneVerificationResponse], error)
- func (h *IdentityHandler) ResetUserPassword(ctx context.Context, req *connect.Request[identitypb.ResetUserPasswordRequest]) (*connect.Response[identitypb.ResetUserPasswordResponse], error)
- func (h *IdentityHandler) ResolveHelpRequest(ctx context.Context, ...) (*connect.Response[identitypb.ResolveHelpRequestResponse], error)
- func (h *IdentityHandler) RevokeAllSessions(ctx context.Context, req *connect.Request[identitypb.RevokeAllSessionsRequest]) (*connect.Response[identitypb.RevokeAllSessionsResponse], error)
- func (h *IdentityHandler) RevokeSession(ctx context.Context, req *connect.Request[identitypb.RevokeSessionRequest]) (*connect.Response[identitypb.RevokeSessionResponse], error)
- func (h *IdentityHandler) SendEmailVerification(ctx context.Context, ...) (*connect.Response[identitypb.SendEmailVerificationResponse], error)
- func (h *IdentityHandler) SetPrimaryAuthDomain(ctx context.Context, ...) (*connect.Response[identitypb.SetPrimaryAuthDomainResponse], error)
- func (h *IdentityHandler) SetUserQuota(ctx context.Context, req *connect.Request[identitypb.SetUserQuotaRequest]) (*connect.Response[identitypb.SetUserQuotaResponse], error)
- func (h *IdentityHandler) SignOutEverywhere(ctx context.Context, req *connect.Request[identitypb.SignOutEverywhereRequest]) (*connect.Response[identitypb.SignOutEverywhereResponse], error)
- func (h *IdentityHandler) UnlinkIdentity(ctx context.Context, req *connect.Request[identitypb.UnlinkIdentityRequest]) (*connect.Response[identitypb.UnlinkIdentityResponse], error)
- func (h *IdentityHandler) UpdateGroup(ctx context.Context, req *connect.Request[identitypb.UpdateGroupRequest]) (*connect.Response[identitypb.UpdateGroupResponse], error)
- func (h *IdentityHandler) UpdateProfile(ctx context.Context, req *connect.Request[identitypb.UpdateProfileRequest]) (*connect.Response[identitypb.UpdateProfileResponse], error)
- func (h *IdentityHandler) UpdateUser(ctx context.Context, req *connect.Request[identitypb.UpdateUserRequest]) (*connect.Response[identitypb.UpdateUserResponse], error)
- func (h *IdentityHandler) UpsertLoginPolicy(ctx context.Context, req *connect.Request[identitypb.UpsertLoginPolicyRequest]) (*connect.Response[identitypb.UpsertLoginPolicyResponse], error)
- func (h *IdentityHandler) UpsertProjectConfig(ctx context.Context, ...) (*connect.Response[identitypb.UpsertProjectConfigResponse], error)
- func (h *IdentityHandler) VerifyDomain(ctx context.Context, req *connect.Request[identitypb.VerifyDomainRequest]) (*connect.Response[identitypb.VerifyDomainResponse], error)
- func (h *IdentityHandler) VerifyEmail(ctx context.Context, req *connect.Request[identitypb.VerifyEmailRequest]) (*connect.Response[identitypb.VerifyEmailResponse], error)
- func (h *IdentityHandler) VerifyEmailLoginCode(ctx context.Context, ...) (*connect.Response[identitypb.VerifyEmailLoginCodeResponse], error)
- func (h *IdentityHandler) VerifyPhoneCode(ctx context.Context, req *connect.Request[identitypb.VerifyPhoneCodeRequest]) (*connect.Response[identitypb.VerifyPhoneCodeResponse], error)
- func (h *IdentityHandler) VerifyProjectAuthDomain(ctx context.Context, ...) (*connect.Response[identitypb.VerifyProjectAuthDomainResponse], error)
- func (h *IdentityHandler) VerifyTotp(ctx context.Context, req *connect.Request[identitypb.VerifyTotpRequest]) (*connect.Response[identitypb.VerifyTotpResponse], error)
- func (h *IdentityHandler) VerifyTotpSetup(ctx context.Context, req *connect.Request[identitypb.VerifyTotpSetupRequest]) (*connect.Response[identitypb.VerifyTotpSetupResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentityHandler ¶
type IdentityHandler struct {
// contains filtered or unexported fields
}
IdentityHandler implements identityconnect.IdentityServiceHandler. Each method delegates to the appropriate service, translating between proto and service-layer types.
func NewIdentityHandler ¶
func NewIdentityHandler( auth *service.AuthService, admin *service.AdminService, groups *service.GroupService, help *service.HelpService, profile *service.ProfileService, idv *service.IdentityVerificationService, domains *service.DomainService, members *service.MembershipService, controlAdmin *service.ControlPlaneAdminService, captchaVerifier captcha.Verifier, cfg *config.Config, ) *IdentityHandler
NewIdentityHandler creates a new IdentityHandler wired to the service layer. idv is optional: pass nil in deployments that do not need identity verification, and the IDV RPCs will return CodeUnimplemented.
domains is optional: nil (memory, which has no control plane) causes the tenant-domain RPCs to return CodeUnimplemented.
members is optional: nil (memory, which has no control plane) causes the tenant-membership/invitation RPCs to return CodeUnimplemented.
controlAdmin is optional: nil (memory, or no configured admin secret) causes the control-plane admin RPCs to return CodeUnimplemented.
captchaVerifier is optional: a nil verifier is treated as disabled, so the CAPTCHA gate behaves as a no-op regardless of the per-endpoint toggles. Production wiring passes a concrete verifier (or the no-op one) built from config.
func (*IdentityHandler) AcceptInvitation ¶
func (h *IdentityHandler) AcceptInvitation( ctx context.Context, req *connect.Request[identitypb.AcceptInvitationRequest], ) (*connect.Response[identitypb.AcceptInvitationResponse], error)
AcceptInvitation completes account setup for an invited user.
func (*IdentityHandler) AcceptTenantInvitation ¶ added in v0.18.0
func (h *IdentityHandler) AcceptTenantInvitation( ctx context.Context, req *connect.Request[identitypb.AcceptTenantInvitationRequest], ) (*connect.Response[identitypb.AcceptTenantInvitationResponse], error)
AcceptTenantInvitation redeems a raw invitation token for the authenticated caller, making them a member of the tenant.
func (*IdentityHandler) AddGroupMember ¶
func (h *IdentityHandler) AddGroupMember( ctx context.Context, req *connect.Request[identitypb.AddGroupMemberRequest], ) (*connect.Response[identitypb.AddGroupMemberResponse], error)
AddGroupMember adds a user to a group.
func (*IdentityHandler) AddProjectAuthDomain ¶ added in v1.1.0
func (h *IdentityHandler) AddProjectAuthDomain( ctx context.Context, req *connect.Request[identitypb.AddProjectAuthDomainRequest], ) (*connect.Response[identitypb.AddProjectAuthDomainResponse], error)
AddProjectAuthDomain registers a customer-owned serving hostname UNVERIFIED and returns its DNS TXT ownership challenge. Operator-only.
func (*IdentityHandler) AdminAddProjectAuthDomain ¶ added in v0.19.0
func (h *IdentityHandler) AdminAddProjectAuthDomain( ctx context.Context, req *connect.Request[identitypb.AdminAddProjectAuthDomainRequest], ) (*connect.Response[identitypb.AdminAddProjectAuthDomainResponse], error)
AdminAddProjectAuthDomain registers a serving hostname on a project, idempotently and seeded verified. Operator-only.
func (*IdentityHandler) AdminAddTenantAdmin ¶ added in v0.19.0
func (h *IdentityHandler) AdminAddTenantAdmin( ctx context.Context, req *connect.Request[identitypb.AdminAddTenantAdminRequest], ) (*connect.Response[identitypb.AdminAddTenantAdminResponse], error)
AdminAddTenantAdmin bootstraps the first tenant administrator. Operator-only.
func (*IdentityHandler) AdminCreateProject ¶ added in v0.19.0
func (h *IdentityHandler) AdminCreateProject( ctx context.Context, req *connect.Request[identitypb.AdminCreateProjectRequest], ) (*connect.Response[identitypb.AdminCreateProjectResponse], error)
AdminCreateProject provisions a control-plane project. Operator-only.
func (*IdentityHandler) AdminCreateProjectCredential ¶ added in v0.19.0
func (h *IdentityHandler) AdminCreateProjectCredential( ctx context.Context, req *connect.Request[identitypb.AdminCreateProjectCredentialRequest], ) (*connect.Response[identitypb.AdminCreateProjectCredentialResponse], error)
AdminCreateProjectCredential mints a project credential and returns the raw key exactly once. Operator-only.
func (*IdentityHandler) AdminCreateTenant ¶ added in v0.19.0
func (h *IdentityHandler) AdminCreateTenant( ctx context.Context, req *connect.Request[identitypb.AdminCreateTenantRequest], ) (*connect.Response[identitypb.AdminCreateTenantResponse], error)
AdminCreateTenant provisions a tenant under a project. Operator-only.
func (*IdentityHandler) ApproveQrLogin ¶
func (h *IdentityHandler) ApproveQrLogin( ctx context.Context, req *connect.Request[identitypb.ApproveQrLoginRequest], ) (*connect.Response[identitypb.ApproveQrLoginResponse], error)
ApproveQrLogin approves or rejects a QR login session from the authenticated device.
func (*IdentityHandler) BeginIdentityVerification ¶ added in v0.4.0
func (h *IdentityHandler) BeginIdentityVerification( ctx context.Context, req *connect.Request[identitypb.BeginIdentityVerificationRequest], ) (*connect.Response[identitypb.BeginIdentityVerificationResponse], error)
BeginIdentityVerification starts a verification session for the caller.
func (*IdentityHandler) BeginOAuthLogin ¶
func (h *IdentityHandler) BeginOAuthLogin( ctx context.Context, req *connect.Request[identitypb.BeginOAuthLoginRequest], ) (*connect.Response[identitypb.BeginOAuthLoginResponse], error)
BeginOAuthLogin returns the provider authorization URL plus the server-minted state artifacts needed to complete the callback safely.
func (*IdentityHandler) BeginPasskeyLogin ¶
func (h *IdentityHandler) BeginPasskeyLogin( ctx context.Context, req *connect.Request[identitypb.BeginPasskeyLoginRequest], ) (*connect.Response[identitypb.BeginPasskeyLoginResponse], error)
BeginPasskeyLogin generates PublicKeyCredentialRequestOptions for navigator.credentials.get().
func (*IdentityHandler) BeginPasskeyRegistration ¶
func (h *IdentityHandler) BeginPasskeyRegistration( ctx context.Context, req *connect.Request[identitypb.BeginPasskeyRegistrationRequest], ) (*connect.Response[identitypb.BeginPasskeyRegistrationResponse], error)
BeginPasskeyRegistration generates PublicKeyCredentialCreationOptions for navigator.credentials.create().
func (*IdentityHandler) BeginPasskeySignup ¶ added in v1.7.2
func (h *IdentityHandler) BeginPasskeySignup( ctx context.Context, req *connect.Request[identitypb.BeginPasskeySignupRequest], ) (*connect.Response[identitypb.BeginPasskeySignupResponse], error)
BeginPasskeySignup generates PublicKeyCredentialCreationOptions for creating a brand-new account from a passkey. Unauthenticated: no session required.
func (*IdentityHandler) BeginTotpSetup ¶
func (h *IdentityHandler) BeginTotpSetup( ctx context.Context, req *connect.Request[identitypb.BeginTotpSetupRequest], ) (*connect.Response[identitypb.BeginTotpSetupResponse], error)
BeginTotpSetup generates a new TOTP secret and recovery codes for the authenticated user. The secret is NOT yet active — the user must call VerifyTotpSetup with a valid code to confirm enrollment.
func (*IdentityHandler) ChangePassword ¶
func (h *IdentityHandler) ChangePassword( ctx context.Context, req *connect.Request[identitypb.ChangePasswordRequest], ) (*connect.Response[identitypb.ChangePasswordResponse], error)
ChangePassword changes the authenticated user's password after verifying the current password. The service layer also revokes all of the user's sessions (deletes their refresh tokens), forcing re-authentication everywhere — including the caller, who must sign in again with the new password.
func (*IdentityHandler) CompletePasskeyLogin ¶
func (h *IdentityHandler) CompletePasskeyLogin( ctx context.Context, req *connect.Request[identitypb.CompletePasskeyLoginRequest], ) (*connect.Response[identitypb.CompletePasskeyLoginResponse], error)
CompletePasskeyLogin verifies the passkey assertion and issues tokens.
func (*IdentityHandler) CompletePasskeyRegistration ¶
func (h *IdentityHandler) CompletePasskeyRegistration( ctx context.Context, req *connect.Request[identitypb.CompletePasskeyRegistrationRequest], ) (*connect.Response[identitypb.CompletePasskeyRegistrationResponse], error)
CompletePasskeyRegistration verifies the attestation and stores the new passkey credential.
func (*IdentityHandler) CompletePasskeySignup ¶ added in v1.7.2
func (h *IdentityHandler) CompletePasskeySignup( ctx context.Context, req *connect.Request[identitypb.CompletePasskeySignupRequest], ) (*connect.Response[identitypb.CompletePasskeySignupResponse], error)
CompletePasskeySignup verifies the attestation, creates the account (or returns an enumeration-safe decoy when the email already exists) and issues tokens. Unauthenticated: no session required.
func (*IdentityHandler) ConfirmEmailChange ¶
func (h *IdentityHandler) ConfirmEmailChange( ctx context.Context, req *connect.Request[identitypb.ConfirmEmailChangeRequest], ) (*connect.Response[identitypb.ConfirmEmailChangeResponse], error)
ConfirmEmailChange consumes a pending email-change token (sent to the new address). This RPC is exempt from the auth middleware so a user clicking the link from their inbox doesn't need to be currently signed in. On success, the user's email is updated and ALL of their refresh tokens are revoked, forcing re-authentication everywhere.
func (*IdentityHandler) ConfirmPasswordReset ¶
func (h *IdentityHandler) ConfirmPasswordReset( ctx context.Context, req *connect.Request[identitypb.ConfirmPasswordResetRequest], ) (*connect.Response[identitypb.ConfirmPasswordResetResponse], error)
ConfirmPasswordReset consumes a password-reset token and sets a new password.
func (*IdentityHandler) CreateDomain ¶ added in v0.17.0
func (h *IdentityHandler) CreateDomain( ctx context.Context, req *connect.Request[identitypb.CreateDomainRequest], ) (*connect.Response[identitypb.CreateDomainResponse], error)
CreateDomain registers a pending email domain on a tenant and returns the DNS TXT challenge the caller must publish. Available only on the postgres control-plane driver; nil service (memory) returns Unimplemented.
func (*IdentityHandler) CreateFirstPlatformAdmin ¶ added in v1.1.0
func (h *IdentityHandler) CreateFirstPlatformAdmin( ctx context.Context, req *connect.Request[identitypb.CreateFirstPlatformAdminRequest], ) (*connect.Response[identitypb.CreateFirstPlatformAdminResponse], error)
CreateFirstPlatformAdmin is the zero-config bootstrap of the first platform admin. Unlike the other Admin RPCs it reads NO admin secret: it succeeds only while platform_admins is empty and is rejected (FailedPrecondition) once any admin exists. nil controlAdmin (memory, no control plane) yields Unimplemented.
func (*IdentityHandler) CreateGroup ¶
func (h *IdentityHandler) CreateGroup( ctx context.Context, req *connect.Request[identitypb.CreateGroupRequest], ) (*connect.Response[identitypb.CreateGroupResponse], error)
CreateGroup creates a new group.
func (*IdentityHandler) CreateTenantInvitation ¶ added in v0.18.0
func (h *IdentityHandler) CreateTenantInvitation( ctx context.Context, req *connect.Request[identitypb.CreateTenantInvitationRequest], ) (*connect.Response[identitypb.CreateTenantInvitationResponse], error)
CreateTenantInvitation invites an email to join a tenant. Owner/admin only. Available only on the postgres control-plane driver; nil service (memory) returns Unimplemented.
func (*IdentityHandler) CreateUser ¶
func (h *IdentityHandler) CreateUser( ctx context.Context, req *connect.Request[identitypb.CreateUserRequest], ) (*connect.Response[identitypb.CreateUserResponse], error)
CreateUser creates a new user. Admin only. Delegates to InviteUser with createImmediately=true.
func (*IdentityHandler) DeactivateUser ¶
func (h *IdentityHandler) DeactivateUser( ctx context.Context, req *connect.Request[identitypb.DeactivateUserRequest], ) (*connect.Response[identitypb.DeactivateUserResponse], error)
DeactivateUser deactivates a user account. Admin only.
func (*IdentityHandler) DeleteGroup ¶
func (h *IdentityHandler) DeleteGroup( ctx context.Context, req *connect.Request[identitypb.DeleteGroupRequest], ) (*connect.Response[identitypb.DeleteGroupResponse], error)
DeleteGroup deletes a group.
func (*IdentityHandler) DeleteLoginPolicy ¶ added in v1.3.0
func (h *IdentityHandler) DeleteLoginPolicy( ctx context.Context, req *connect.Request[identitypb.DeleteLoginPolicyRequest], ) (*connect.Response[identitypb.DeleteLoginPolicyResponse], error)
DeleteLoginPolicy clears a claimed tenant's LoginPolicy (idempotent). Operator-only.
func (*IdentityHandler) DeletePasskey ¶
func (h *IdentityHandler) DeletePasskey( ctx context.Context, req *connect.Request[identitypb.DeletePasskeyRequest], ) (*connect.Response[identitypb.DeletePasskeyResponse], error)
DeletePasskey deletes a registered passkey credential. Delegates to ProfileService.DeletePasskey.
func (*IdentityHandler) DeleteUser ¶
func (h *IdentityHandler) DeleteUser( ctx context.Context, req *connect.Request[identitypb.DeleteUserRequest], ) (*connect.Response[identitypb.DeleteUserResponse], error)
DeleteUser physically removes a user and cascades all user-owned records (sessions, tokens, passkeys, etc.). Audit events are retained. Admin only.
func (*IdentityHandler) DisableTotp ¶
func (h *IdentityHandler) DisableTotp( ctx context.Context, req *connect.Request[identitypb.DisableTotpRequest], ) (*connect.Response[identitypb.DisableTotpResponse], error)
DisableTotp removes TOTP enrollment for the authenticated user. Requires password confirmation for security.
func (*IdentityHandler) GetCurrentUser ¶
func (h *IdentityHandler) GetCurrentUser( ctx context.Context, req *connect.Request[identitypb.GetCurrentUserRequest], ) (*connect.Response[identitypb.GetCurrentUserResponse], error)
GetCurrentUser returns the currently authenticated user's profile.
func (*IdentityHandler) GetIdentityVerificationStatus ¶ added in v0.4.0
func (h *IdentityHandler) GetIdentityVerificationStatus( ctx context.Context, req *connect.Request[identitypb.GetIdentityVerificationStatusRequest], ) (*connect.Response[identitypb.GetIdentityVerificationStatusResponse], error)
GetIdentityVerificationStatus returns the current status of a verification.
func (*IdentityHandler) GetLoginPolicy ¶ added in v1.3.0
func (h *IdentityHandler) GetLoginPolicy( ctx context.Context, req *connect.Request[identitypb.GetLoginPolicyRequest], ) (*connect.Response[identitypb.GetLoginPolicyResponse], error)
GetLoginPolicy reads a claimed tenant's LoginPolicy. The policy field is unset when none exists. Operator-only.
func (*IdentityHandler) GetProjectConfig ¶ added in v1.3.0
func (h *IdentityHandler) GetProjectConfig( ctx context.Context, req *connect.Request[identitypb.GetProjectConfigRequest], ) (*connect.Response[identitypb.GetProjectConfigResponse], error)
GetProjectConfig reads a project's config_json blob. Operator-only.
func (*IdentityHandler) GetQrLoginSession ¶
func (h *IdentityHandler) GetQrLoginSession( ctx context.Context, req *connect.Request[identitypb.GetQrLoginSessionRequest], ) (*connect.Response[identitypb.GetQrLoginSessionResponse], error)
GetQrLoginSession retrieves the details of a QR login session for display on the authenticated device.
func (*IdentityHandler) GetUser ¶
func (h *IdentityHandler) GetUser( ctx context.Context, req *connect.Request[identitypb.GetUserRequest], ) (*connect.Response[identitypb.GetUserResponse], error)
GetUser returns a single user by ID. Admin only.
func (*IdentityHandler) InitiateQrLogin ¶
func (h *IdentityHandler) InitiateQrLogin( ctx context.Context, req *connect.Request[identitypb.InitiateQrLoginRequest], ) (*connect.Response[identitypb.InitiateQrLoginResponse], error)
InitiateQrLogin creates a new QR login session for a new device.
func (*IdentityHandler) InviteUser ¶
func (h *IdentityHandler) InviteUser( ctx context.Context, req *connect.Request[identitypb.InviteUserRequest], ) (*connect.Response[identitypb.InviteUserResponse], error)
InviteUser creates a new user invitation or immediately creates an active user.
func (*IdentityHandler) LinkIdentity ¶ added in v1.3.0
func (h *IdentityHandler) LinkIdentity( ctx context.Context, req *connect.Request[identitypb.LinkIdentityRequest], ) (*connect.Response[identitypb.LinkIdentityResponse], error)
LinkIdentity attaches a freshly-verified OAuth identity to the caller. The server performs the provider code exchange itself; the client is never trusted to assert the identity.
func (*IdentityHandler) ListAuditEvents ¶
func (h *IdentityHandler) ListAuditEvents( ctx context.Context, req *connect.Request[identitypb.ListAuditEventsRequest], ) (*connect.Response[identitypb.ListAuditEventsResponse], error)
ListAuditEvents returns a paginated list of audit events. Admin only. Delegates to ProfileService.ListAuditEvents which enforces admin role.
func (*IdentityHandler) ListGroupMembers ¶
func (h *IdentityHandler) ListGroupMembers( ctx context.Context, req *connect.Request[identitypb.ListGroupMembersRequest], ) (*connect.Response[identitypb.ListGroupMembersResponse], error)
ListGroupMembers lists all members of a group.
func (*IdentityHandler) ListGroups ¶
func (h *IdentityHandler) ListGroups( ctx context.Context, req *connect.Request[identitypb.ListGroupsRequest], ) (*connect.Response[identitypb.ListGroupsResponse], error)
ListGroups returns a paginated list of groups.
func (*IdentityHandler) ListHelpRequests ¶
func (h *IdentityHandler) ListHelpRequests( ctx context.Context, req *connect.Request[identitypb.ListHelpRequestsRequest], ) (*connect.Response[identitypb.ListHelpRequestsResponse], error)
ListHelpRequests returns a paginated list of admin help requests. Admin only.
func (*IdentityHandler) ListLinkedIdentities ¶ added in v1.3.0
func (h *IdentityHandler) ListLinkedIdentities( ctx context.Context, req *connect.Request[identitypb.ListLinkedIdentitiesRequest], ) (*connect.Response[identitypb.ListLinkedIdentitiesResponse], error)
ListLinkedIdentities returns the authenticated user's connected providers.
func (*IdentityHandler) ListMySessions ¶
func (h *IdentityHandler) ListMySessions( ctx context.Context, req *connect.Request[identitypb.ListMySessionsRequest], ) (*connect.Response[identitypb.ListMySessionsResponse], error)
ListMySessions lists the authenticated user's active sessions.
func (*IdentityHandler) ListPasskeys ¶
func (h *IdentityHandler) ListPasskeys( ctx context.Context, req *connect.Request[identitypb.ListPasskeysRequest], ) (*connect.Response[identitypb.ListPasskeysResponse], error)
ListPasskeys lists the authenticated user's registered passkey credentials. Delegates to ProfileService.ListMyPasskeys.
func (*IdentityHandler) ListProjectAuthDomains ¶ added in v1.1.0
func (h *IdentityHandler) ListProjectAuthDomains( ctx context.Context, req *connect.Request[identitypb.ListProjectAuthDomainsRequest], ) (*connect.Response[identitypb.ListProjectAuthDomainsResponse], error)
ListProjectAuthDomains lists a project's auth-domains (verified and pending). Operator-only.
func (*IdentityHandler) ListTenantDomains ¶ added in v0.17.0
func (h *IdentityHandler) ListTenantDomains( ctx context.Context, req *connect.Request[identitypb.ListTenantDomainsRequest], ) (*connect.Response[identitypb.ListTenantDomainsResponse], error)
ListTenantDomains lists every domain bound to a tenant.
func (*IdentityHandler) ListTenantInvitations ¶ added in v0.18.0
func (h *IdentityHandler) ListTenantInvitations( ctx context.Context, req *connect.Request[identitypb.ListTenantInvitationsRequest], ) (*connect.Response[identitypb.ListTenantInvitationsResponse], error)
ListTenantInvitations lists every invitation in a tenant. Owner/admin only.
func (*IdentityHandler) ListTenantMembers ¶ added in v0.18.0
func (h *IdentityHandler) ListTenantMembers( ctx context.Context, req *connect.Request[identitypb.ListTenantMembersRequest], ) (*connect.Response[identitypb.ListTenantMembersResponse], error)
ListTenantMembers lists every membership in a tenant. Owner/admin only.
func (*IdentityHandler) ListUsers ¶
func (h *IdentityHandler) ListUsers( ctx context.Context, req *connect.Request[identitypb.ListUsersRequest], ) (*connect.Response[identitypb.ListUsersResponse], error)
ListUsers returns a paginated list of users. Admin only.
func (*IdentityHandler) Logout ¶
func (h *IdentityHandler) Logout( ctx context.Context, req *connect.Request[identitypb.LogoutRequest], ) (*connect.Response[identitypb.LogoutResponse], error)
Logout invalidates the given refresh token.
func (*IdentityHandler) OAuthLogin ¶
func (h *IdentityHandler) OAuthLogin( ctx context.Context, req *connect.Request[identitypb.OAuthLoginRequest], ) (*connect.Response[identitypb.OAuthLoginResponse], error)
OAuthLogin exchanges an OAuth authorization code for backend-issued tokens.
The service layer is responsible for the actual provider-side code exchange and identity verification. The handler simply forwards the authorization code, the user-selected provider, and the redirect URI.
func (*IdentityHandler) PasswordLogin ¶
func (h *IdentityHandler) PasswordLogin( ctx context.Context, req *connect.Request[identitypb.PasswordLoginRequest], ) (*connect.Response[identitypb.PasswordLoginResponse], error)
PasswordLogin authenticates a user with email and password. If TOTP is enabled, returns totp_required=true and a login_challenge_id for the client to pass to VerifyTotp.
func (*IdentityHandler) PasswordSignup ¶
func (h *IdentityHandler) PasswordSignup( ctx context.Context, req *connect.Request[identitypb.PasswordSignupRequest], ) (*connect.Response[identitypb.PasswordSignupResponse], error)
PasswordSignup creates a new user account with email and password.
func (*IdentityHandler) PollQrLogin ¶
func (h *IdentityHandler) PollQrLogin( ctx context.Context, req *connect.Request[identitypb.PollQrLoginRequest], ) (*connect.Response[identitypb.PollQrLoginResponse], error)
PollQrLogin polls for QR login session completion from the new device.
func (*IdentityHandler) ReactivateUser ¶
func (h *IdentityHandler) ReactivateUser( ctx context.Context, req *connect.Request[identitypb.ReactivateUserRequest], ) (*connect.Response[identitypb.ReactivateUserResponse], error)
ReactivateUser reactivates a previously deactivated user. Admin only.
func (*IdentityHandler) RedeemMagicLink ¶ added in v0.11.0
func (h *IdentityHandler) RedeemMagicLink( ctx context.Context, req *connect.Request[identitypb.RedeemMagicLinkRequest], ) (*connect.Response[identitypb.RedeemMagicLinkResponse], error)
RedeemMagicLink consumes the single-use token, resolves-or-creates the user by the bound email, and issues a token pair plus the validated return_to.
func (*IdentityHandler) RedeemOAuthCode ¶ added in v0.9.0
func (h *IdentityHandler) RedeemOAuthCode( ctx context.Context, req *connect.Request[identitypb.RedeemOAuthCodeRequest], ) (*connect.Response[identitypb.RedeemOAuthCodeResponse], error)
RedeemOAuthCode exchanges the single-use one-time code from the hosted OAuth callback redirect for a backend-issued token pair. The code is consumed atomically; a replay or expired code surfaces as CodeUnauthenticated.
func (*IdentityHandler) RefreshToken ¶
func (h *IdentityHandler) RefreshToken( ctx context.Context, req *connect.Request[identitypb.RefreshTokenRequest], ) (*connect.Response[identitypb.RefreshTokenResponse], error)
RefreshToken rotates the refresh token and issues a new access token.
func (*IdentityHandler) RegenerateRecoveryCodes ¶
func (h *IdentityHandler) RegenerateRecoveryCodes( ctx context.Context, req *connect.Request[identitypb.RegenerateRecoveryCodesRequest], ) (*connect.Response[identitypb.RegenerateRecoveryCodesResponse], error)
RegenerateRecoveryCodes generates a new set of recovery codes, invalidating any existing codes. Requires password confirmation.
func (*IdentityHandler) RemoveGroupMember ¶
func (h *IdentityHandler) RemoveGroupMember( ctx context.Context, req *connect.Request[identitypb.RemoveGroupMemberRequest], ) (*connect.Response[identitypb.RemoveGroupMemberResponse], error)
RemoveGroupMember removes a user from a group.
func (*IdentityHandler) RemoveTenantMember ¶ added in v0.18.0
func (h *IdentityHandler) RemoveTenantMember( ctx context.Context, req *connect.Request[identitypb.RemoveTenantMemberRequest], ) (*connect.Response[identitypb.RemoveTenantMemberResponse], error)
RemoveTenantMember removes a user's membership from a tenant. Owner/admin only, and never the tenant's last owner.
func (*IdentityHandler) RequestAdminHelp ¶
func (h *IdentityHandler) RequestAdminHelp( ctx context.Context, req *connect.Request[identitypb.RequestAdminHelpRequest], ) (*connect.Response[identitypb.RequestAdminHelpResponse], error)
RequestAdminHelp creates a new admin help request. This is an unauthenticated endpoint — the user cannot log in and needs admin assistance.
func (*IdentityHandler) RequestEmailChange ¶
func (h *IdentityHandler) RequestEmailChange( ctx context.Context, req *connect.Request[identitypb.RequestEmailChangeRequest], ) (*connect.Response[identitypb.RequestEmailChangeResponse], error)
RequestEmailChange begins the primary-email rotation flow. The caller must already be authenticated (auth middleware enforces this) AND supply their current password as a re-authentication step. The new address is sent a verification link; the old address is sent a security notice. The change takes effect only after ConfirmEmailChange.
func (*IdentityHandler) RequestEmailLoginCode ¶ added in v0.11.0
func (h *IdentityHandler) RequestEmailLoginCode( ctx context.Context, req *connect.Request[identitypb.RequestEmailLoginCodeRequest], ) (*connect.Response[identitypb.RequestEmailLoginCodeResponse], error)
RequestEmailLoginCode emails a 6-digit OTP. The response is identical whether or not the email has an account (anti-enumeration); the service always returns nil for a well-formed request.
func (*IdentityHandler) RequestMagicLink ¶ added in v0.11.0
func (h *IdentityHandler) RequestMagicLink( ctx context.Context, req *connect.Request[identitypb.RequestMagicLinkRequest], ) (*connect.Response[identitypb.RequestMagicLinkResponse], error)
RequestMagicLink emails a single-use sign-in link. A disallowed return_to is rejected with InvalidArgument; everything else returns the same anti-enumeration success.
func (*IdentityHandler) RequestPasswordReset ¶
func (h *IdentityHandler) RequestPasswordReset( ctx context.Context, req *connect.Request[identitypb.RequestPasswordResetRequest], ) (*connect.Response[identitypb.RequestPasswordResetResponse], error)
RequestPasswordReset sends a password reset link to the user's primary verified email (the address on file for the account). Always returns success to prevent email enumeration.
func (*IdentityHandler) RequestPhoneVerification ¶ added in v0.14.0
func (h *IdentityHandler) RequestPhoneVerification( ctx context.Context, req *connect.Request[identitypb.RequestPhoneVerificationRequest], ) (*connect.Response[identitypb.RequestPhoneVerificationResponse], error)
RequestPhoneVerification texts a 6-digit code to the supplied number for the authenticated caller to confirm.
func (*IdentityHandler) ResetUserPassword ¶
func (h *IdentityHandler) ResetUserPassword( ctx context.Context, req *connect.Request[identitypb.ResetUserPasswordRequest], ) (*connect.Response[identitypb.ResetUserPasswordResponse], error)
ResetUserPassword resets a user's password. Admin only.
func (*IdentityHandler) ResolveHelpRequest ¶
func (h *IdentityHandler) ResolveHelpRequest( ctx context.Context, req *connect.Request[identitypb.ResolveHelpRequestRequest], ) (*connect.Response[identitypb.ResolveHelpRequestResponse], error)
ResolveHelpRequest resolves or rejects an admin help request. Admin only.
func (*IdentityHandler) RevokeAllSessions ¶
func (h *IdentityHandler) RevokeAllSessions( ctx context.Context, req *connect.Request[identitypb.RevokeAllSessionsRequest], ) (*connect.Response[identitypb.RevokeAllSessionsResponse], error)
RevokeAllSessions revokes all sessions for the authenticated user. Requires password confirmation.
func (*IdentityHandler) RevokeSession ¶
func (h *IdentityHandler) RevokeSession( ctx context.Context, req *connect.Request[identitypb.RevokeSessionRequest], ) (*connect.Response[identitypb.RevokeSessionResponse], error)
RevokeSession revokes a single session by its ID.
func (*IdentityHandler) SendEmailVerification ¶
func (h *IdentityHandler) SendEmailVerification( ctx context.Context, req *connect.Request[identitypb.SendEmailVerificationRequest], ) (*connect.Response[identitypb.SendEmailVerificationResponse], error)
SendEmailVerification sends a verification email to the authenticated user.
func (*IdentityHandler) SetPrimaryAuthDomain ¶ added in v1.2.0
func (h *IdentityHandler) SetPrimaryAuthDomain( ctx context.Context, req *connect.Request[identitypb.SetPrimaryAuthDomainRequest], ) (*connect.Response[identitypb.SetPrimaryAuthDomainResponse], error)
SetPrimaryAuthDomain promotes a VERIFIED custom auth-domain to the project's primary serving host, atomically demoting the current primary. Operator-only.
func (*IdentityHandler) SetUserQuota ¶
func (h *IdentityHandler) SetUserQuota( ctx context.Context, req *connect.Request[identitypb.SetUserQuotaRequest], ) (*connect.Response[identitypb.SetUserQuotaResponse], error)
SetUserQuota sets a user's storage quota. Admin only.
func (*IdentityHandler) SignOutEverywhere ¶
func (h *IdentityHandler) SignOutEverywhere( ctx context.Context, req *connect.Request[identitypb.SignOutEverywhereRequest], ) (*connect.Response[identitypb.SignOutEverywhereResponse], error)
SignOutEverywhere revokes all sessions for the authenticated user. This is a distinct RPC from RevokeAllSessions per the proto definition but delegates to the same service method.
func (*IdentityHandler) UnlinkIdentity ¶ added in v1.3.0
func (h *IdentityHandler) UnlinkIdentity( ctx context.Context, req *connect.Request[identitypb.UnlinkIdentityRequest], ) (*connect.Response[identitypb.UnlinkIdentityResponse], error)
UnlinkIdentity disconnects a provider identity from the caller, refusing to remove the user's last remaining sign-in credential.
func (*IdentityHandler) UpdateGroup ¶
func (h *IdentityHandler) UpdateGroup( ctx context.Context, req *connect.Request[identitypb.UpdateGroupRequest], ) (*connect.Response[identitypb.UpdateGroupResponse], error)
UpdateGroup updates a group's name and/or description.
func (*IdentityHandler) UpdateProfile ¶
func (h *IdentityHandler) UpdateProfile( ctx context.Context, req *connect.Request[identitypb.UpdateProfileRequest], ) (*connect.Response[identitypb.UpdateProfileResponse], error)
UpdateProfile updates the authenticated user's profile (name, avatar).
func (*IdentityHandler) UpdateUser ¶
func (h *IdentityHandler) UpdateUser( ctx context.Context, req *connect.Request[identitypb.UpdateUserRequest], ) (*connect.Response[identitypb.UpdateUserResponse], error)
UpdateUser updates a user's profile fields. Admin only.
func (*IdentityHandler) UpsertLoginPolicy ¶ added in v1.3.0
func (h *IdentityHandler) UpsertLoginPolicy( ctx context.Context, req *connect.Request[identitypb.UpsertLoginPolicyRequest], ) (*connect.Response[identitypb.UpsertLoginPolicyResponse], error)
UpsertLoginPolicy authors a claimed tenant's LoginPolicy (the policy the login path enforces). Operator-only.
func (*IdentityHandler) UpsertProjectConfig ¶ added in v1.3.0
func (h *IdentityHandler) UpsertProjectConfig( ctx context.Context, req *connect.Request[identitypb.UpsertProjectConfigRequest], ) (*connect.Response[identitypb.UpsertProjectConfigResponse], error)
UpsertProjectConfig replaces a project's config_json blob. Operator-only.
func (*IdentityHandler) VerifyDomain ¶ added in v0.17.0
func (h *IdentityHandler) VerifyDomain( ctx context.Context, req *connect.Request[identitypb.VerifyDomainRequest], ) (*connect.Response[identitypb.VerifyDomainResponse], error)
VerifyDomain proves control of a pending domain, claiming its tenant and making the caller an owner on success.
func (*IdentityHandler) VerifyEmail ¶
func (h *IdentityHandler) VerifyEmail( ctx context.Context, req *connect.Request[identitypb.VerifyEmailRequest], ) (*connect.Response[identitypb.VerifyEmailResponse], error)
VerifyEmail consumes an email-verification token and marks the email verified.
func (*IdentityHandler) VerifyEmailLoginCode ¶ added in v0.11.0
func (h *IdentityHandler) VerifyEmailLoginCode( ctx context.Context, req *connect.Request[identitypb.VerifyEmailLoginCodeRequest], ) (*connect.Response[identitypb.VerifyEmailLoginCodeResponse], error)
VerifyEmailLoginCode validates the OTP, resolves-or-creates the user by email, and issues a token pair.
func (*IdentityHandler) VerifyPhoneCode ¶ added in v0.14.0
func (h *IdentityHandler) VerifyPhoneCode( ctx context.Context, req *connect.Request[identitypb.VerifyPhoneCodeRequest], ) (*connect.Response[identitypb.VerifyPhoneCodeResponse], error)
VerifyPhoneCode validates the OTP and marks the authenticated caller's phone verified, returning the updated user.
func (*IdentityHandler) VerifyProjectAuthDomain ¶ added in v1.1.0
func (h *IdentityHandler) VerifyProjectAuthDomain( ctx context.Context, req *connect.Request[identitypb.VerifyProjectAuthDomainRequest], ) (*connect.Response[identitypb.VerifyProjectAuthDomainResponse], error)
VerifyProjectAuthDomain checks the DNS TXT challenge and flips a custom auth-domain to verified (resolving). Operator-only.
func (*IdentityHandler) VerifyTotp ¶
func (h *IdentityHandler) VerifyTotp( ctx context.Context, req *connect.Request[identitypb.VerifyTotpRequest], ) (*connect.Response[identitypb.VerifyTotpResponse], error)
VerifyTotp completes a login challenge that requires TOTP. Accepts either a 6-digit TOTP code or a recovery code.
func (*IdentityHandler) VerifyTotpSetup ¶
func (h *IdentityHandler) VerifyTotpSetup( ctx context.Context, req *connect.Request[identitypb.VerifyTotpSetupRequest], ) (*connect.Response[identitypb.VerifyTotpSetupResponse], error)
VerifyTotpSetup confirms TOTP enrollment by verifying a code generated from the secret provided by BeginTotpSetup.