Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HeaderXUserID = "X-User-Id"
Functions ¶
func NewBasicAuthValidator ¶
func NewBasicAuthValidator(cfg *config.Config) middleware.BasicAuthValidator
func NewOAuthServer ¶
func NewOAuthServer(clientStore *OAuthClientStore) *server.Server
Types ¶
type OAuthClientStore ¶
type OAuthClientStore struct {
Repo entity.Oauth2ClientRepo
}
func NewOAuthClientStore ¶
func NewOAuthClientStore(repo entity.Oauth2ClientRepo) *OAuthClientStore
func (*OAuthClientStore) GetByID ¶
func (o *OAuthClientStore) GetByID(ctx context.Context, id string) (oauth2.ClientInfo, error)
func (*OAuthClientStore) UserAuthorizationHandler ¶
func (o *OAuthClientStore) UserAuthorizationHandler(w http.ResponseWriter, req *http.Request) (userID string, err error)
type OAuthHandler ¶
func NewOAuthHandler ¶
func NewOAuthHandler(srv *server.Server) *OAuthHandler
func (*OAuthHandler) HandleAuthorizeRequest ¶
func (o *OAuthHandler) HandleAuthorizeRequest(c echo.Context) error
func (*OAuthHandler) HandleTokenRequest ¶
func (o *OAuthHandler) HandleTokenRequest(c echo.Context) error
func (*OAuthHandler) ValidateToken ¶
func (o *OAuthHandler) ValidateToken(next strict.StrictEchoHandlerFunc, operationID string) strict.StrictEchoHandlerFunc
Click to show internal directories.
Click to hide internal directories.