Documentation ¶
Index ¶
- type AuthService
- func (s *AuthService) GetRefreshToken(ctx context.Context, t *auth.NewToken) (*auth.Token, error)
- func (s *AuthService) Login(ctx context.Context, l *auth.NewLogin) (*auth.Auth, error)
- func (s *AuthService) Logout(ctx context.Context, t *auth.NewRefreshToken) (*empty.Empty, error)
- func (s *AuthService) Relogin(ctx context.Context, l *auth.NewRelogin) (*auth.Auth, error)
- type ProviderLogin
- type RefreshTokenClaims
- type ServiceParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct { auth.UnimplementedAuthServiceServer *aphgrpc.Service // contains filtered or unexported fields }
AuthService is the container for managing auth service definitions
func NewAuthService ¶
func NewAuthService(srvP *ServiceParams) (*AuthService, error)
NewAuthService is the constructor for creating a new instance of AuthService
func (*AuthService) GetRefreshToken ¶
func (*AuthService) Logout ¶
func (s *AuthService) Logout(ctx context.Context, t *auth.NewRefreshToken) (*empty.Empty, error)
func (*AuthService) Relogin ¶
func (s *AuthService) Relogin(ctx context.Context, l *auth.NewRelogin) (*auth.Auth, error)
type ProviderLogin ¶
type ProviderLogin struct {
// contains filtered or unexported fields
}
type RefreshTokenClaims ¶
type RefreshTokenClaims struct { // Identity is used as an identifier for a user's identity data // (it is an ID for orcid, an email for others) Identity string // Provider is the login provider Provider string // Standard JWT claims jwt.StandardClaims }
type ServiceParams ¶
type ServiceParams struct { Repository repository.AuthRepository `validate:"required"` Publisher message.Publisher `validate:"required"` User user.UserServiceClient `validate:"required"` Identity identity.IdentityServiceClient `validate:"required"` JWTAuth jwtauth.JWTAuth `validate:"required"` ProviderSecrets oauth.ProviderSecrets `validate:"required"` Options []aphgrpc.Option `validate:"required"` }
ServiceParams are the attributes that are required for creating a new AuthService
Click to show internal directories.
Click to hide internal directories.