Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAccessTokenNotFound ... ErrAccessTokenNotFound = errors.New("Access token not found") // ErrAccessTokenExpired ... ErrAccessTokenExpired = errors.New("Access token expired") )
Functions ¶
This section is empty.
Types ¶
type AuthInterceptor ¶
type AuthInterceptor struct {
// contains filtered or unexported fields
}
func NewAuthInterceptor ¶
func NewAuthInterceptor(db *bun.DB, rf int, acc *access.AccessConfig) *AuthInterceptor
func (*AuthInterceptor) Authenticate ¶
func (interceptor *AuthInterceptor) Authenticate(token string) (*model.AccessToken, error)
Authenticate checks the access token is valid
func (*AuthInterceptor) Unary ¶
func (interceptor *AuthInterceptor) Unary() grpc.UnaryServerInterceptor
Click to show internal directories.
Click to hide internal directories.