Documentation ¶
Index ¶
Constants ¶
View Source
const AuthorizationSourceBasic = "basic"
View Source
const AuthorizationSourceBearer = "bearer"
Variables ¶
View Source
var ( ErrBasicAuthHeaderNotFound = errors.New("no header value found") ErrHeaderValueMalformed = errors.New("header value malformed") ErrAppVerifcationFailed = errors.New("application verification failed") ErrUnknown = errors.New("unknown error") ErrInvalidAuthorizationResult = errors.New("invalid authorization result") )
View Source
var ( SourceContextKey = &contextKey{"Source"} AuthorizationIDContextKey = &contextKey{"AuthorizationID"} ClientIDContextKey = &contextKey{"ClientID"} SubjectContextKey = &contextKey{"Subject"} )
Functions ¶
func ClientIDFromBasicAuth ¶
func ConnectAuthenticator ¶
func ConnectAuthenticator(as ApplicationQuerySource) func(http.Handler) http.Handler
Types ¶
type ApplicationQuerySource ¶
type ApplicationQuerySource interface {
ApplicationByClientID(ctx context.Context, clientID string) (*application.Application, error)
}
type AuthorizationInfo ¶
type AuthorizationInfo struct { Source string ClientID string Subject *string AuthorizationID *string }
func FromContext ¶
func FromContext(ctx context.Context) (*AuthorizationInfo, error)
type AuthorizationSource ¶
type AuthorizationSource string
Click to show internal directories.
Click to hide internal directories.