service

package
v0.0.0-...-ea208d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2023 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

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 (s *AuthService) GetRefreshToken(ctx context.Context, t *auth.NewToken) (*auth.Token, error)

func (*AuthService) Login

func (s *AuthService) Login(ctx context.Context, l *auth.NewLogin) (*auth.Auth, error)

func (*AuthService) Logout

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL