user

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (

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

Variables

This section is empty.

Functions

func Action

func Action(ctx *context.Context)

Action response for follow/unfollow user request

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 AutoSignIn

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

AutoSignIn reads cookie and try to auto-login.

func ConnectOpenID added in v1.2.0

func ConnectOpenID(ctx *context.Context)

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

func ConnectOpenIDPost added in v1.2.0

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

func Dashboard(ctx *context.Context)

Dashboard render the dashborad page

func DeleteEmail

func DeleteEmail(ctx *context.Context)

DeleteEmail response for delete user's email

func DeleteKey added in v1.2.0

func DeleteKey(ctx *context.Context)

DeleteKey response for delete user's SSH/GPG key

func DeleteOpenID added in v1.2.0

func DeleteOpenID(ctx *context.Context)

DeleteOpenID response for delete user's openid

func Email2User

func Email2User(ctx *context.Context)

Email2User show user page via email

func Followers

func Followers(ctx *context.Context)

Followers render user's followers page

func Following

func Following(ctx *context.Context)

Following render user's followering page

func ForgotPasswd

func ForgotPasswd(ctx *context.Context)

ForgotPasswd render the forget pasword page

func ForgotPasswdPost

func ForgotPasswdPost(ctx *context.Context)

ForgotPasswdPost response for forget password request

func GetNotificationCount added in v1.1.0

func GetNotificationCount(c *context.Context)

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

func GetUserByName

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

GetUserByName get user by name

func GetUserByParams

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

GetUserByParams returns user whose name is presented in URL paramenter.

func Issues

func Issues(ctx *context.Context)

Issues render the user issues page

func LinkAccount added in v1.1.0

func LinkAccount(ctx *context.Context)

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

func LinkAccountPostRegister added in v1.1.0

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 added in v1.1.0

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

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

func NotificationPurgePost added in v1.4.0

func NotificationPurgePost(c *context.Context)

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

func NotificationStatusPost added in v1.1.0

func NotificationStatusPost(c *context.Context)

NotificationStatusPost is a route for changing the status of a notification

func Notifications added in v1.1.0

func Notifications(c *context.Context)

Notifications is the notifications page

func Profile

func Profile(ctx *context.Context)

Profile render user's profile page

func RegisterOpenID added in v1.2.0

func RegisterOpenID(ctx *context.Context)

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

func RegisterOpenIDPost added in v1.2.0

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

func ResetPasswd(ctx *context.Context)

ResetPasswd render the reset password page

func ResetPasswdPost

func ResetPasswdPost(ctx *context.Context)

ResetPasswdPost response from reset password request

func Settings

func Settings(ctx *context.Context)

Settings render user's profile page

func SettingsAccountLinks(ctx *context.Context)

SettingsAccountLinks render the account links settings page

func SettingsApplications

func SettingsApplications(ctx *context.Context)

SettingsApplications render user's access tokens page

func SettingsApplicationsPost

func SettingsApplicationsPost(ctx *context.Context, form auth.NewAccessTokenForm)

SettingsApplicationsPost response for add user's access token

func SettingsAvatar

func SettingsAvatar(ctx *context.Context)

SettingsAvatar render user avatar page

func SettingsAvatarPost

func SettingsAvatarPost(ctx *context.Context, form auth.AvatarForm)

SettingsAvatarPost response for change user's avatar request

func SettingsDelete

func SettingsDelete(ctx *context.Context)

SettingsDelete render user suicide page and response for delete user himself

func SettingsDeleteAccountLink(ctx *context.Context)

SettingsDeleteAccountLink delete a single account link

func SettingsDeleteApplication

func SettingsDeleteApplication(ctx *context.Context)

SettingsDeleteApplication response for delete user access token

func SettingsDeleteAvatar

func SettingsDeleteAvatar(ctx *context.Context)

SettingsDeleteAvatar render delete avatar page

func SettingsEmailPost

func SettingsEmailPost(ctx *context.Context, form auth.AddEmailForm)

SettingsEmailPost response for change user's email

func SettingsEmails

func SettingsEmails(ctx *context.Context)

SettingsEmails render user's emails page

func SettingsKeys added in v1.2.0

func SettingsKeys(ctx *context.Context)

SettingsKeys render user's SSH/GPG public keys page

func SettingsKeysPost added in v1.2.0

func SettingsKeysPost(ctx *context.Context, form auth.AddKeyForm)

SettingsKeysPost response for change user's SSH/GPG keys

func SettingsOpenID added in v1.2.0

func SettingsOpenID(ctx *context.Context)

SettingsOpenID renders change user's openid page

func SettingsOpenIDPost added in v1.2.0

func SettingsOpenIDPost(ctx *context.Context, form auth.AddOpenIDForm)

SettingsOpenIDPost response for change user's openid

func SettingsOrganization added in v1.2.0

func SettingsOrganization(ctx *context.Context)

SettingsOrganization render all the organization of the user

func SettingsPost

func SettingsPost(ctx *context.Context, form auth.UpdateProfileForm)

SettingsPost response for change user's profile

func SettingsRepos added in v1.3.0

func SettingsRepos(ctx *context.Context)

SettingsRepos display a list of all repositories of the user

func SettingsSecurity added in v1.3.0

func SettingsSecurity(ctx *context.Context)

SettingsSecurity render change user's password page and 2FA

func SettingsSecurityPost added in v1.3.0

func SettingsSecurityPost(ctx *context.Context, form auth.ChangePasswordForm)

SettingsSecurityPost response for change user's password

func SettingsTwoFactorDisable added in v1.1.0

func SettingsTwoFactorDisable(ctx *context.Context)

SettingsTwoFactorDisable deletes the user's 2FA settings.

func SettingsTwoFactorEnroll added in v1.1.0

func SettingsTwoFactorEnroll(ctx *context.Context)

SettingsTwoFactorEnroll shows the page where the user can enroll into 2FA.

func SettingsTwoFactorEnrollPost added in v1.1.0

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

SettingsTwoFactorEnrollPost handles enrolling the user into 2FA.

func SettingsTwoFactorRegenerateScratch added in v1.1.0

func SettingsTwoFactorRegenerateScratch(ctx *context.Context)

SettingsTwoFactorRegenerateScratch regenerates the user's 2FA scratch code.

func ShowSSHKeys

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

ShowSSHKeys output all the ssh keys of user by uid

func SignIn

func SignIn(ctx *context.Context)

SignIn render sign in page

func SignInOAuth added in v1.1.0

func SignInOAuth(ctx *context.Context)

SignInOAuth handles the OAuth2 login buttons

func SignInOAuthCallback added in v1.1.0

func SignInOAuthCallback(ctx *context.Context)

SignInOAuthCallback handles the callback from the given provider

func SignInOpenID added in v1.2.0

func SignInOpenID(ctx *context.Context)

SignInOpenID render sign in page

func SignInOpenIDPost added in v1.2.0

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

SignInOpenIDPost response for openid sign in request

func SignInPost

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

SignInPost response for sign in request

func SignOut

func SignOut(ctx *context.Context)

SignOut sign out from login status

func SignUp

func SignUp(ctx *context.Context)

SignUp render the register page

func SignUpPost

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

SignUpPost response for sign up information submission

func ToggleOpenIDVisibility added in v1.2.0

func ToggleOpenIDVisibility(ctx *context.Context)

ToggleOpenIDVisibility response for toggle visibility of user's openid

func TwoFactor added in v1.1.0

func TwoFactor(ctx *context.Context)

TwoFactor shows the user a two-factor authentication page.

func TwoFactorPost added in v1.1.0

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

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

func TwoFactorScratch added in v1.1.0

func TwoFactorScratch(ctx *context.Context)

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

func TwoFactorScratchPost added in v1.1.0

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

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

func UpdateAvatarSetting

func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *models.User) error

UpdateAvatarSetting update user's avatar FIXME: limit size.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL