Documentation ¶
Index ¶
- func AppendMongoCollection(collectionName string) func(http.Handler) http.Handler
- func ExtractCollection(r *http.Request) (collection *mongo.Collection, err error)
- func ExtractUserInfo(r *http.Request) (username string, fullName string, subject string, groups []string, err error)
- func OpenIDConnectJWTAuthentication(config configurationTypes.OpenIDConnectConfiguration) func(http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendMongoCollection ¶
AppendMongoCollection attaches the collection needed for the request to the context of the request
func ExtractCollection ¶
func ExtractCollection(r *http.Request) (collection *mongo.Collection, err error)
func ExtractUserInfo ¶
func ExtractUserInfo(r *http.Request) (username string, fullName string, subject string, groups []string, err error)
ExtractUserInfo allows the retrieval of the available user information that has been set by the OpenIDConnectJWTAuthentication middleware. If any of the expected user information fields is empty, it will return an error
func OpenIDConnectJWTAuthentication ¶
func OpenIDConnectJWTAuthentication(config configurationTypes.OpenIDConnectConfiguration) func(http.Handler) http.Handler
OpenIDConnectJWTAuthentication uses the Access Token present in the request headers to authenticate and check the authorization of the user making a call to the backend. To check a request for authorization, the middleware validates the access token via the JWKS uri and checks the information contained in the access token. Furthermore, it will also check that the access token contains the correct scopes to allow access to the backend. To allow the individual access control to some routes, the middleware attaches all scopes found to the request context. This way, the routes may filter the scopes further, if needed.
Types ¶
This section is empty.