Documentation
¶
Overview ¶
Package jap (Jitsi Authentication Provider) contains HTTP handlers and utilities for authenticating against a range of OAuth2 providers and returning signed JWT assertions about the authenticated user.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CIDFromContext ¶
CIDFromContext returns the client ID bound to the context, if any.
func GoogleLogin ¶
func GoogleLogin(ctx context.Context, key *rsa.PrivateKey, permCheck PermissionChecker) func(http.ResponseWriter, *http.Request)
GoogleLogin returns a handler which attempts to extract a client ID from its context and sends the information to Google to validate the user. If no client ID exists in the context it panics.
The handler may return one of the following errors:
400 BadRequest – If the id_token form param is missing. 401 StatusUnauthorzed — If the permCheck function returns false. 408 RequestTimeout – If the contexts deadline was exceeded. 500 InternalServerError – If the upstream returns a response we don't understand. 502 BadGateway – If an upstream service fails to respond for another reason.
Types ¶
type PermissionChecker ¶
PermissionChecker is a function that's used for checking if the email associated with a given token has permission to perform some action.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
jap
The jap command launches an OAuth2 server that generates a JSON Web Signature (JWS) to prove the users identity to other Jitsi services.
|
The jap command launches an OAuth2 server that generates a JSON Web Signature (JWS) to prove the users identity to other Jitsi services. |