Documentation ¶
Overview ¶
Package middleware is a generated GoMock package.
Package middleware is a generated GoMock package.
Index ¶
Constants ¶
const ( UserKey = "portal-user" OIDCAccountInfoKey = "oidc-account-info" )
Variables ¶
This section is empty.
Functions ¶
func NewStaticTokenAuthMiddleware ¶
func NewStaticTokenAuthMiddleware(tokens []string) echo.MiddlewareFunc
NewStaticTokenAuthMiddleware - 静的なtokenで認証Middlewareを初期化する
Types ¶
type AuthMiddleware ¶
type AuthMiddleware interface {
Authenticate(next echo.HandlerFunc) echo.HandlerFunc
}
AuthMiddleware - echoの認証middleware
func NewAuthMiddleware ¶
func NewAuthMiddleware(su usecase.SessionUsecase) AuthMiddleware
NewAuthMiddleware - AuthNMiddlewareを初期化する
type MockAuthMiddleware ¶
type MockAuthMiddleware struct {
// contains filtered or unexported fields
}
MockAuthMiddleware is a mock of AuthMiddleware interface.
func NewMockAuthMiddleware ¶
func NewMockAuthMiddleware(ctrl *gomock.Controller) *MockAuthMiddleware
NewMockAuthMiddleware creates a new mock instance.
func (*MockAuthMiddleware) Authenticate ¶
func (m *MockAuthMiddleware) Authenticate(next echo.HandlerFunc) echo.HandlerFunc
Authenticate mocks base method.
func (*MockAuthMiddleware) EXPECT ¶
func (m *MockAuthMiddleware) EXPECT() *MockAuthMiddlewareMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockAuthMiddlewareMockRecorder ¶
type MockAuthMiddlewareMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthMiddlewareMockRecorder is the mock recorder for MockAuthMiddleware.
func (*MockAuthMiddlewareMockRecorder) Authenticate ¶
func (mr *MockAuthMiddlewareMockRecorder) Authenticate(next interface{}) *gomock.Call
Authenticate indicates an expected call of Authenticate.
type MockRoleValidationMiddleware ¶
type MockRoleValidationMiddleware struct {
// contains filtered or unexported fields
}
MockRoleValidationMiddleware is a mock of RoleValidationMiddleware interface.
func NewMockRoleValidationMiddleware ¶
func NewMockRoleValidationMiddleware(ctrl *gomock.Controller) *MockRoleValidationMiddleware
NewMockRoleValidationMiddleware creates a new mock instance.
func (*MockRoleValidationMiddleware) Authenticate ¶
func (m *MockRoleValidationMiddleware) Authenticate(next echo.HandlerFunc) echo.HandlerFunc
Authenticate mocks base method.
func (*MockRoleValidationMiddleware) EXPECT ¶
func (m *MockRoleValidationMiddleware) EXPECT() *MockRoleValidationMiddlewareMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRoleValidationMiddlewareMockRecorder ¶
type MockRoleValidationMiddlewareMockRecorder struct {
// contains filtered or unexported fields
}
MockRoleValidationMiddlewareMockRecorder is the mock recorder for MockRoleValidationMiddleware.
func (*MockRoleValidationMiddlewareMockRecorder) Authenticate ¶
func (mr *MockRoleValidationMiddlewareMockRecorder) Authenticate(next interface{}) *gomock.Call
Authenticate indicates an expected call of Authenticate.
type OIDCAccountMiddleware ¶
type OIDCAccountMiddleware interface {
Authenticate(next echo.HandlerFunc) echo.HandlerFunc
}
OIDCAccountMiddleware - echoの認証middleware
func NewOIDCAccountMiddleware ¶
func NewOIDCAccountMiddleware(su usecase.SessionUsecase) OIDCAccountMiddleware
NewOIDCAccountMiddleware - OIDCAccountMiddlewareを初期化する
type RoleValidationMiddleware ¶
type RoleValidationMiddleware interface {
Authenticate(next echo.HandlerFunc) echo.HandlerFunc
}
RoleValidationMiddleware - echoのrole検証middleware
func NewRoleValidationMiddleware ¶
func NewRoleValidationMiddleware(allowedRoles ...domain.RoleType) RoleValidationMiddleware
NewRoleValidationMiddleware - RoleValidationMiddlewareを初期化する