Documentation ¶
Overview ¶
Package auth provides the auth handlers (authenticate, login, ...) for the Vela API.
Usage:
import "github.com/go-vela/server/api/auth"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthRedirect ¶
GetAuthRedirect handles cases where the OAuth callback was overridden by supplying a redirect_uri in the login process. It will send the user to the destination to handle the last leg in the auth flow - exchanging "code" and "state" for a token. This will only handle non-headless flows (ie. web or cli).
func GetAuthToken ¶
GetAuthToken represents the API handler to process a user logging in to Vela from the API or UI.
func Logout ¶
Logout represents the API handler to process a user logging out of Vela. Primarily, it deletes the current refresh token cookie.
func PostAuthToken ¶
PostAuthToken represents the API handler to process a user logging in using PAT to Vela from the API.
func RefreshAccessToken ¶
RefreshAccessToken will return a new access token if the provided refresh token via cookie is valid.
func ValidateOAuthToken ¶ added in v0.21.0
ValidateOAuthToken represents the API handler to validate that a user OAuth token was created by Vela.
func ValidateServerToken ¶
ValidateServerToken will validate if a token was issued by the server if it is provided in the auth header.
Types ¶
This section is empty.