auth

package
v0.0.0-...-d56ccab Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAuthService

type IAuthService interface {
	Authorize(r *http.Request) (user string, err error)
}

func NewAuthService

func NewAuthService() IAuthService

type MockIAuthService

type MockIAuthService struct {
	mock.Mock
}

MockIAuthService is an autogenerated mock type for the IAuthService type

func NewMockIAuthService

func NewMockIAuthService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockIAuthService

NewMockIAuthService creates a new instance of MockIAuthService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockIAuthService) Authorize

func (_m *MockIAuthService) Authorize(r *http.Request) (string, error)

Authorize provides a mock function with given fields: r

type SlbCustomClaims

type SlbCustomClaims struct {
	AZP         string      `json:"azp,omitempty"`
	RawAudClaim interface{} `json:"aud,omitempty"`
	Email       string      `json:"email,omitempty"`
	UserID      string      `json:"userid,omitempty"`
	JTI         string      `json:"jti,omitempty"`
	ApiKey      string      `json:"apiKey,omitempty"`
	Sub         string      `json:"sub,omitempty"`
	Issuer      string      `json:"iss,omitempty"`
	Aud         string
	Audiences   []string
}

Claims struct Issuer added for user role service

type UnauthorizedError

type UnauthorizedError struct {
	// contains filtered or unexported fields
}

func NewUnauthorizedError

func NewUnauthorizedError(message string) *UnauthorizedError

func (*UnauthorizedError) Error

func (r *UnauthorizedError) Error() string

func (*UnauthorizedError) Is

func (s *UnauthorizedError) Is(target error) bool

assert style in golang

Jump to

Keyboard shortcuts

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