Documentation ¶
Index ¶
- func IsAuthInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (resp any, err error)
- type IdentityService
- func (s *IdentityService) CurrentUser(ctx context.Context, req *proto.CurrentUserRequest) (*proto.CurrentUserReponse, error)
- func (s *IdentityService) Generate(uid, aid string) (string, string, error)
- func (s *IdentityService) IsAuth(ctx context.Context, req *proto.IsAuthRequest) (*proto.IsAuthReponse, error)
- func (s IdentityService) Login(ctx context.Context, req *proto.LoginRequest) (*proto.LoginReponse, error)
- func (s *IdentityService) Logout(ctx context.Context, req *proto.LogoutRequest) (*proto.LogoutReponse, error)
- func (s *IdentityService) ParseClaims(token string) (jwt.MapClaims, error)
- func (s *IdentityService) Refresh(ctx context.Context, req *proto.RefreshRequest) (*proto.RefreshReponse, error)
- func (s IdentityService) RegisterFinish(ctx context.Context, req *proto.RegisterFinishRequest) (*proto.RegisterFinishReponse, error)
- func (s IdentityService) RegisterPending(ctx context.Context, req *proto.RegisterPendingRequest) (*proto.RegisterPendingReponse, error)
- func (s IdentityService) RegisterStart(ctx context.Context, req *proto.RegisterStartRequest) (*proto.RegisterStartReponse, error)
- func (s IdentityService) ResetPasswordFinish(ctx context.Context, req *proto.ResetPasswordFinishRequest) (*proto.ResetPasswordFinishReponse, error)
- func (s IdentityService) ResetPasswordPending(ctx context.Context, req *proto.ResetPasswordPendingRequest) (*proto.ResetPasswordPendingReponse, error)
- func (s IdentityService) ResetPasswordStart(ctx context.Context, req *proto.ResetPasswordStartRequest) (*proto.ResetPasswordStartReponse, error)
- func (s IdentityService) UpdateDisplayName(ctx context.Context, req *proto.UpdateDisplayNameRequest) (*proto.UpdateDisplayNameReponse, error)
- func (s IdentityService) UpdateEmailFinish(ctx context.Context, req *proto.UpdateEmailFinishRequest) (*proto.UpdateEmailFinishReponse, error)
- func (s IdentityService) UpdateEmailStart(ctx context.Context, req *proto.UpdateEmailStartRequest) (*proto.UpdateEmailStartReponse, error)
- func (s IdentityService) UpdatePassword(ctx context.Context, req *proto.UpdatePasswordRequest) (*proto.UpdatePasswordReponse, error)
- type KeyAid
- type KeyUid
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAuthInterceptor ¶
func IsAuthInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)
Types ¶
type IdentityService ¶
type IdentityService struct { *proto.UnimplementedIdentityServiceServer // contains filtered or unexported fields }
func NewIdentityService ¶
func NewIdentityService(ds *data.Store, ec *services.EmailClient) *IdentityService
func (*IdentityService) CurrentUser ¶
func (s *IdentityService) CurrentUser(ctx context.Context, req *proto.CurrentUserRequest) (*proto.CurrentUserReponse, error)
func (*IdentityService) Generate ¶
func (s *IdentityService) Generate(uid, aid string) (string, string, error)
func (*IdentityService) IsAuth ¶
func (s *IdentityService) IsAuth(ctx context.Context, req *proto.IsAuthRequest) (*proto.IsAuthReponse, error)
func (IdentityService) Login ¶
func (s IdentityService) Login(ctx context.Context, req *proto.LoginRequest) (*proto.LoginReponse, error)
func (*IdentityService) Logout ¶
func (s *IdentityService) Logout(ctx context.Context, req *proto.LogoutRequest) (*proto.LogoutReponse, error)
Logout: - Only delete the refresh token from the database if a token from the existing family was presented; otherwise no action is taken. - This prevents bad actors from using stolen (but still cryptographically valid) tokens from an old family to force logout.
func (*IdentityService) ParseClaims ¶
func (s *IdentityService) ParseClaims(token string) (jwt.MapClaims, error)
func (*IdentityService) Refresh ¶
func (s *IdentityService) Refresh(ctx context.Context, req *proto.RefreshRequest) (*proto.RefreshReponse, error)
func (IdentityService) RegisterFinish ¶
func (s IdentityService) RegisterFinish(ctx context.Context, req *proto.RegisterFinishRequest) (*proto.RegisterFinishReponse, error)
func (IdentityService) RegisterPending ¶
func (s IdentityService) RegisterPending(ctx context.Context, req *proto.RegisterPendingRequest) (*proto.RegisterPendingReponse, error)
func (IdentityService) RegisterStart ¶
func (s IdentityService) RegisterStart(ctx context.Context, req *proto.RegisterStartRequest) (*proto.RegisterStartReponse, error)
func (IdentityService) ResetPasswordFinish ¶
func (s IdentityService) ResetPasswordFinish(ctx context.Context, req *proto.ResetPasswordFinishRequest) (*proto.ResetPasswordFinishReponse, error)
func (IdentityService) ResetPasswordPending ¶
func (s IdentityService) ResetPasswordPending(ctx context.Context, req *proto.ResetPasswordPendingRequest) (*proto.ResetPasswordPendingReponse, error)
func (IdentityService) ResetPasswordStart ¶
func (s IdentityService) ResetPasswordStart(ctx context.Context, req *proto.ResetPasswordStartRequest) (*proto.ResetPasswordStartReponse, error)
func (IdentityService) UpdateDisplayName ¶
func (s IdentityService) UpdateDisplayName(ctx context.Context, req *proto.UpdateDisplayNameRequest) (*proto.UpdateDisplayNameReponse, error)
func (IdentityService) UpdateEmailFinish ¶
func (s IdentityService) UpdateEmailFinish(ctx context.Context, req *proto.UpdateEmailFinishRequest) (*proto.UpdateEmailFinishReponse, error)
func (IdentityService) UpdateEmailStart ¶
func (s IdentityService) UpdateEmailStart(ctx context.Context, req *proto.UpdateEmailStartRequest) (*proto.UpdateEmailStartReponse, error)
func (IdentityService) UpdatePassword ¶
func (s IdentityService) UpdatePassword(ctx context.Context, req *proto.UpdatePasswordRequest) (*proto.UpdatePasswordReponse, error)
Click to show internal directories.
Click to hide internal directories.