Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidTokenClaims = errors.New("invalid token claims") GuestRole = "gst" )
Functions ¶
func NewAuthService ¶
func NewAuthService(authConfig config.AuthConfig) core.AuthService
func NewCommunicator ¶
func NewCommunicator(auth core.AuthService, config config.CommonConfig) core.InnerCommunicator
func NewRequestParams ¶
func NewRequestParams(r *http.Request) *meta.RequestParams
Types ¶
type AuthMiddleware ¶
type AuthMiddleware struct {
// contains filtered or unexported fields
}
func NewAuthMiddleware ¶
func NewAuthMiddleware(service core.AuthService) *AuthMiddleware
func (*AuthMiddleware) Authenticator ¶
func (m *AuthMiddleware) Authenticator(next http.Handler) http.Handler
func (*AuthMiddleware) Authorizer ¶
func (m *AuthMiddleware) Authorizer(next http.Handler) http.Handler
func (*AuthMiddleware) UserSetter ¶
func (m *AuthMiddleware) UserSetter(next http.Handler) http.Handler
Click to show internal directories.
Click to hide internal directories.