gitea: code.gitea.io/gitea/routers/user Index | Files | Directories

package user

import "code.gitea.io/gitea/routers/user"

Index

Package Files

auth.go auth_openid.go home.go notification.go oauth.go profile.go

Constants

const (
    // AccessTokenErrorCodeInvalidRequest represents an error code specified in RFC 6749
    AccessTokenErrorCodeInvalidRequest AccessTokenErrorCode = "invalid_request"
    // AccessTokenErrorCodeInvalidClient represents an error code specified in RFC 6749
    AccessTokenErrorCodeInvalidClient = "invalid_client"
    // AccessTokenErrorCodeInvalidGrant represents an error code specified in RFC 6749
    AccessTokenErrorCodeInvalidGrant = "invalid_grant"
    // AccessTokenErrorCodeUnauthorizedClient represents an error code specified in RFC 6749
    AccessTokenErrorCodeUnauthorizedClient = "unauthorized_client"
    // AccessTokenErrorCodeUnsupportedGrantType represents an error code specified in RFC 6749
    AccessTokenErrorCodeUnsupportedGrantType = "unsupported_grant_type"
    // AccessTokenErrorCodeInvalidScope represents an error code specified in RFC 6749
    AccessTokenErrorCodeInvalidScope = "invalid_scope"
)
const (

    // TplActivate template path for activate user
    TplActivate base.TplName = "user/auth/activate"
)

func AccessTokenOAuth Uses

func AccessTokenOAuth(ctx *context.Context, form auth.AccessTokenForm)

AccessTokenOAuth manages all access token requests by the client

func Action Uses

func Action(ctx *context.Context)

Action response for follow/unfollow user request

func Activate Uses

func Activate(ctx *context.Context)

Activate render activate user page

func ActivateEmail Uses

func ActivateEmail(ctx *context.Context)

ActivateEmail render the activate email page

func AuthorizeOAuth Uses

func AuthorizeOAuth(ctx *context.Context, form auth.AuthorizationForm)

AuthorizeOAuth manages authorize requests

func AutoSignIn Uses

func AutoSignIn(ctx *context.Context) (bool, error)

AutoSignIn reads cookie and try to auto-login.

func ConnectOpenID Uses

func ConnectOpenID(ctx *context.Context)

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

func ConnectOpenIDPost Uses

func ConnectOpenIDPost(ctx *context.Context, form auth.ConnectOpenIDForm)

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

func Dashboard Uses

func Dashboard(ctx *context.Context)

Dashboard render the dashborad page

func Email2User Uses

func Email2User(ctx *context.Context)

Email2User show user page via email

func Followers Uses

func Followers(ctx *context.Context)

Followers render user's followers page

func Following Uses

func Following(ctx *context.Context)

Following render user's followering page

func ForgotPasswd Uses

func ForgotPasswd(ctx *context.Context)

ForgotPasswd render the forget pasword page

func ForgotPasswdPost Uses

func ForgotPasswdPost(ctx *context.Context)

ForgotPasswdPost response for forget password request

func GetNotificationCount Uses

func GetNotificationCount(c *context.Context)

GetNotificationCount is the middleware that sets the notification count in the context

func GetUserByName Uses

func GetUserByName(ctx *context.Context, name string) *models.User

GetUserByName get user by name

func GetUserByParams Uses

func GetUserByParams(ctx *context.Context) *models.User

GetUserByParams returns user whose name is presented in URL paramenter.

func GrantApplicationOAuth Uses

func GrantApplicationOAuth(ctx *context.Context, form auth.GrantApplicationForm)

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

func Issues Uses

func Issues(ctx *context.Context)

Issues render the user issues page

func LinkAccount Uses

func LinkAccount(ctx *context.Context)

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

func LinkAccountPostRegister Uses

func LinkAccountPostRegister(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterForm)

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

func LinkAccountPostSignIn Uses

func LinkAccountPostSignIn(ctx *context.Context, signInForm auth.SignInForm)

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

func MustChangePassword Uses

func MustChangePassword(ctx *context.Context)

MustChangePassword renders the page to change a user's password

func MustChangePasswordPost Uses

func MustChangePasswordPost(ctx *context.Context, cpt *captcha.Captcha, form auth.MustChangePasswordForm)

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

func NotificationPurgePost Uses

func NotificationPurgePost(c *context.Context)

NotificationPurgePost is a route for 'purging' the list of notifications - marking all unread as read

func NotificationStatusPost Uses

func NotificationStatusPost(c *context.Context)

NotificationStatusPost is a route for changing the status of a notification

func Notifications Uses

func Notifications(c *context.Context)

Notifications is the notifications page

func Profile Uses

func Profile(ctx *context.Context)

Profile render user's profile page

func RegisterOpenID Uses

func RegisterOpenID(ctx *context.Context)

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

func RegisterOpenIDPost Uses

func RegisterOpenIDPost(ctx *context.Context, cpt *captcha.Captcha, form auth.SignUpOpenIDForm)

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

func ResetPasswd Uses

func ResetPasswd(ctx *context.Context)

ResetPasswd render the account recovery page

func ResetPasswdPost Uses

func ResetPasswdPost(ctx *context.Context)

ResetPasswdPost response from account recovery request

func ShowGPGKeys Uses

func ShowGPGKeys(ctx *context.Context, uid int64)

ShowGPGKeys output all the public GPG keys of user by uid

func ShowSSHKeys Uses

func ShowSSHKeys(ctx *context.Context, uid int64)

ShowSSHKeys output all the ssh keys of user by uid

func SignIn Uses

func SignIn(ctx *context.Context)

SignIn render sign in page

func SignInOAuth Uses

func SignInOAuth(ctx *context.Context)

SignInOAuth handles the OAuth2 login buttons

func SignInOAuthCallback Uses

func SignInOAuthCallback(ctx *context.Context)

SignInOAuthCallback handles the callback from the given provider

func SignInOpenID Uses

func SignInOpenID(ctx *context.Context)

SignInOpenID render sign in page

func SignInOpenIDPost Uses

func SignInOpenIDPost(ctx *context.Context, form auth.SignInOpenIDForm)

SignInOpenIDPost response for openid sign in request

func SignInPost Uses

func SignInPost(ctx *context.Context, form auth.SignInForm)

SignInPost response for sign in request

func SignOut Uses

func SignOut(ctx *context.Context)

SignOut sign out from login status

func SignUp Uses

func SignUp(ctx *context.Context)

SignUp render the register page

func SignUpPost Uses

func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterForm)

SignUpPost response for sign up information submission

func TwoFactor Uses

func TwoFactor(ctx *context.Context)

TwoFactor shows the user a two-factor authentication page.

func TwoFactorPost Uses

func TwoFactorPost(ctx *context.Context, form auth.TwoFactorAuthForm)

TwoFactorPost validates a user's two-factor authentication token.

func TwoFactorScratch Uses

func TwoFactorScratch(ctx *context.Context)

TwoFactorScratch shows the scratch code form for two-factor authentication.

func TwoFactorScratchPost Uses

func TwoFactorScratchPost(ctx *context.Context, form auth.TwoFactorScratchAuthForm)

TwoFactorScratchPost validates and invalidates a user's two-factor scratch token.

func U2F Uses

func U2F(ctx *context.Context)

U2F shows the U2F login page

func U2FChallenge Uses

func U2FChallenge(ctx *context.Context)

U2FChallenge submits a sign challenge to the browser

func U2FSign Uses

func U2FSign(ctx *context.Context, signResp u2f.SignResponse)

U2FSign authenticates the user by signResp

type AccessTokenError Uses

type AccessTokenError struct {
    ErrorCode        AccessTokenErrorCode `json:"error" form:"error"`
    ErrorDescription string               `json:"error_description"`
}

AccessTokenError represents an error response specified in RFC 6749

func (AccessTokenError) Error Uses

func (err AccessTokenError) Error() string

Error returns the error message

type AccessTokenErrorCode Uses

type AccessTokenErrorCode string

AccessTokenErrorCode represents an error code specified in RFC 6749

type AccessTokenResponse Uses

type AccessTokenResponse struct {
    AccessToken  string    `json:"access_token"`
    TokenType    TokenType `json:"token_type"`
    ExpiresIn    int64     `json:"expires_in"`
    RefreshToken string    `json:"refresh_token"`
}

AccessTokenResponse represents a successful access token response

type AuthorizeError Uses

type AuthorizeError struct {
    ErrorCode        AuthorizeErrorCode `json:"error" form:"error"`
    ErrorDescription string
    State            string
}

AuthorizeError represents an error type specified in RFC 6749

func (AuthorizeError) Error Uses

func (err AuthorizeError) Error() string

Error returns the error message

type AuthorizeErrorCode Uses

type AuthorizeErrorCode string

AuthorizeErrorCode represents an error code specified in RFC 6749

const (
    // ErrorCodeInvalidRequest represents the according error in RFC 6749
    ErrorCodeInvalidRequest AuthorizeErrorCode = "invalid_request"
    // ErrorCodeUnauthorizedClient represents the according error in RFC 6749
    ErrorCodeUnauthorizedClient AuthorizeErrorCode = "unauthorized_client"
    // ErrorCodeAccessDenied represents the according error in RFC 6749
    ErrorCodeAccessDenied AuthorizeErrorCode = "access_denied"
    // ErrorCodeUnsupportedResponseType represents the according error in RFC 6749
    ErrorCodeUnsupportedResponseType AuthorizeErrorCode = "unsupported_response_type"
    // ErrorCodeInvalidScope represents the according error in RFC 6749
    ErrorCodeInvalidScope AuthorizeErrorCode = "invalid_scope"
    // ErrorCodeServerError represents the according error in RFC 6749
    ErrorCodeServerError AuthorizeErrorCode = "server_error"
    // ErrorCodeTemporaryUnavailable represents the according error in RFC 6749
    ErrorCodeTemporaryUnavailable AuthorizeErrorCode = "temporarily_unavailable"
)

type TokenType Uses

type TokenType string

TokenType specifies the kind of token

const (
    // TokenTypeBearer represents a token type specified in RFC 6749
    TokenTypeBearer TokenType = "bearer"
    // TokenTypeMAC represents a token type specified in RFC 6749
    TokenTypeMAC = "mac"
)

Directories

PathSynopsis
setting

Package user imports 31 packages (graph) and is imported by 5 packages. Updated 2019-09-20. Refresh now. Tools for package owners.