Documentation
¶
Index ¶
Constants ¶
View Source
const ( HeaderAuthorization = "Authorization" HeaderAuthorizationBearerPrefix = "Bearer " HeaderAuthorizationBasicAuthPrefix = "Basic " )
View Source
const ( LOGIN checkType = iota TRY_LOGIN BASICAUTH TOKEN NONE )
View Source
const (
CtxKeyOauth2JwtKeyPayload = "oauth2-jwt-token-payload"
)
Variables ¶
This section is empty.
Functions ¶
func GetSessionRefresh ¶
func GetSessionRefresh(ctx context.Context) *identitypb.SessionRefresh
func WithSessionRefresh ¶
func WithSessionRefresh(ctx context.Context, refresh *identitypb.SessionRefresh) context.Context
Types ¶
type Auth ¶
type Auth struct {
UserAuth domain.UserAuthFacade
OAuth2Server *oauth2.OAuth2Server
TokenService tokenpb.TokenServiceServer
Settings settings.OpenapiSettings
}
func NewAuth ¶
func NewAuth(oauth2server *oauth2.OAuth2Server, token tokenpb.TokenServiceServer, settings settings.OpenapiSettings) (*Auth, error)
type OAuth2APISpec ¶
type OAuth2APISpec interface {
MatchPath(path string) bool
PathVars(temp, path string) map[string]string
Method() string
Scheme() string
}
OAuth2APISpec .
type OpenapiSpec ¶
OpenapiSpec .
func (*OpenapiSpec) MatchPath ¶
func (s *OpenapiSpec) MatchPath(path string) bool
func (*OpenapiSpec) Method ¶
func (s *OpenapiSpec) Method() string
func (*OpenapiSpec) PathVars ¶
func (s *OpenapiSpec) PathVars(template, path string) map[string]string
func (*OpenapiSpec) Scheme ¶
func (s *OpenapiSpec) Scheme() string
type TokenClient ¶
func VerifyAccessKey ¶
func VerifyAccessKey(tokenService tokenpb.TokenServiceServer, r *http.Request) (TokenClient, error)
func VerifyOpenapiOAuth2Token ¶
func VerifyOpenapiOAuth2Token(o *oauth2.OAuth2Server, spec OAuth2APISpec, r *http.Request) (TokenClient, error)
Click to show internal directories.
Click to hide internal directories.