auth

package
v3.1.61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TplActivate       templates.TplName = "user/auth/activate"        // for activate user
	TplActivatePrompt templates.TplName = "user/auth/activate_prompt" // for showing a message for user activation
)

Variables

This section is empty.

Functions

func AccessTokenOAuth

func AccessTokenOAuth(ctx *context.Context)

AccessTokenOAuth manages all access token requests by the client

func Activate

func Activate(ctx *context.Context)

Activate render activate user page

func ActivateEmail

func ActivateEmail(ctx *context.Context)

ActivateEmail render the activate email page

func ActivatePost

func ActivatePost(ctx *context.Context)

ActivatePost handles account activation with password check

func AuthorizeOAuth

func AuthorizeOAuth(ctx *context.Context)

AuthorizeOAuth manages authorize requests

func CheckAutoLogin

func CheckAutoLogin(ctx *context.Context) bool

func ConnectOpenID

func ConnectOpenID(ctx *context.Context)

ConnectOpenID shows a form to connect an OpenID URI to an existing account

func ConnectOpenIDPost

func ConnectOpenIDPost(ctx *context.Context)

ConnectOpenIDPost handles submission of a form to connect an OpenID URI to an existing account

func ForgotPasswd

func ForgotPasswd(ctx *context.Context)

ForgotPasswd render the forget password page

func ForgotPasswdPost

func ForgotPasswdPost(ctx *context.Context)

ForgotPasswdPost response for forget password request

func GrantApplicationOAuth

func GrantApplicationOAuth(ctx *context.Context)

GrantApplicationOAuth manages the post request submitted when a user grants access to an application

func HandleSignOut

func HandleSignOut(ctx *context.Context)

HandleSignOut resets the session and sets the cookies

func InfoOAuth

func InfoOAuth(ctx *context.Context)

InfoOAuth manages request for userinfo endpoint

func IntrospectOAuth

func IntrospectOAuth(ctx *context.Context)

IntrospectOAuth introspects an oauth token

func LinkAccount

func LinkAccount(ctx *context.Context)

LinkAccount shows the page where the user can decide to login or create a new account

func LinkAccountPostRegister

func LinkAccountPostRegister(ctx *context.Context)

LinkAccountPostRegister handle the creation of a new account for an external account using signUp

func LinkAccountPostSignIn

func LinkAccountPostSignIn(ctx *context.Context)

LinkAccountPostSignIn handle the coupling of external account with another account using signIn

func MustChangePassword

func MustChangePassword(ctx *context.Context)

MustChangePassword renders the page to change a user's password

func MustChangePasswordPost

func MustChangePasswordPost(ctx *context.Context)

MustChangePasswordPost response for updating a user's password after their account was created by an admin

func OIDCKeys

func OIDCKeys(ctx *context.Context)

OIDCKeys generates the JSON Web Key Set

func OIDCWellKnown

func OIDCWellKnown(ctx *context.Context)

OIDCWellKnown generates JSON so OIDC clients know Gitea's capabilities

func Oauth2SetLinkAccountData

func Oauth2SetLinkAccountData(ctx *context.Context, linkAccountData LinkAccountData) error

func RedirectAfterLogin

func RedirectAfterLogin(ctx *context.Context)

func RegisterOpenID

func RegisterOpenID(ctx *context.Context)

RegisterOpenID shows a form to create a new user authenticated via an OpenID URI

func RegisterOpenIDPost

func RegisterOpenIDPost(ctx *context.Context)

RegisterOpenIDPost handles submission of a form to create a new user authenticated via an OpenID URI

func ResetPasswd

func ResetPasswd(ctx *context.Context)

ResetPasswd render the account recovery page

func ResetPasswdPost

func ResetPasswdPost(ctx *context.Context)

ResetPasswdPost response from account recovery request

func SignIn

func SignIn(ctx *context.Context)

SignIn render sign in page

func SignInOAuth

func SignInOAuth(ctx *context.Context)

SignInOAuth handles the OAuth2 login buttons

func SignInOAuthCallback

func SignInOAuthCallback(ctx *context.Context)

SignInOAuthCallback handles the callback from the given provider