Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessToken ¶
func AccessToken(c echo.Context) error
AccessToken delivers an access_token and a refresh_token if the client gives a valid token for OIDC.
func FindLoginDomain ¶
FindLoginDomain returns the context name for which the login domain matches the host.
func Login ¶
func Login(c echo.Context) error
Login checks that the OpenID Connect has been successful and logs in the user.
func LoginDomainHandler ¶
LoginDomainHandler is the handler for the requests on the login domain. It shows a page with a login button (that can start the OIDC dance).
func Redirect ¶
func Redirect(c echo.Context) error
Redirect is the route after the Identity Provider has redirected the user to the stack. The redirection is made to a generic domain, like oauthcallback.cozy.localhost and the association with an instance is made via a call to the UserInfo endpoint. It redirects to the cozy instance to login the user.
Types ¶
type Config ¶
type Config struct { AllowOAuthToken bool AllowCustomInstance bool ClientID string ClientSecret string Scope string RedirectURI string AuthorizeURL string TokenURL string UserInfoURL string UserInfoField string UserInfoPrefix string UserInfoSuffix string IDTokenKeyURL string }
Config is the config to log in a user with an OpenID Connect identity provider.