Documentation ¶
Index ¶
- Variables
- func CancelDeleteAccount(c *gin.Context)
- func CancelDisableAccount(c *gin.Context)
- func CancelForgotPassword(c *gin.Context)
- func CancelRegistration(c *gin.Context)
- func CancelUpdateEmailAddress(c *gin.Context)
- func CancelUpdatePassword(c *gin.Context)
- func CheckUsernameParameter(c *gin.Context, username, parameterName string) bool
- func ConfirmEmailAddress(c *gin.Context)
- func DeleteAccount(c *gin.Context)
- func DeleteAuthToken(c *gin.Context)
- func DeleteAuthTokenWithKey(c *gin.Context)
- func DeleteNotification(c *gin.Context)
- func DisableAccount(c *gin.Context)
- func ForgotPassword(c *gin.Context)
- func GetAuthToken(c *gin.Context)
- func GetAuthTokens(c *gin.Context)
- func GetAvailability(c *gin.Context)
- func GetInfos(c *gin.Context)
- func GetNotification(c *gin.Context)
- func GetNotifications(c *gin.Context)
- func GetNotificationsSettings(c *gin.Context)
- func LoginWithFacebook(c *gin.Context)
- func LoginWithGoogle(c *gin.Context)
- func LoginWithPassword(c *gin.Context)
- func Logout(c *gin.Context)
- func RefreshAuthToken(c *gin.Context)
- func RegisterWithFacebook(c *gin.Context)
- func RegisterWithGoogle(c *gin.Context)
- func RegisterWithPassword(c *gin.Context)
- func SaveNotificationsSettings(c *gin.Context)
- func UnsubscribeNotificationByKey(c *gin.Context)
- func UpdateAuthToken(c *gin.Context)
- func UpdateEmailAddress(c *gin.Context)
- func UpdateInfos(c *gin.Context)
- func UpdateNotificationNotified(c *gin.Context)
- func UpdateNotificationRead(c *gin.Context)
- func UpdatePassword(c *gin.Context)
- func UpdateSettings(c *gin.Context)
- func UpdateSocialNetworks(c *gin.Context)
- func ValidateDeleteAccount(c *gin.Context)
- func ValidateDisableAccount(c *gin.Context)
- func ValidateForgotPassword(c *gin.Context)
- func ValidateNewEmailAddress(c *gin.Context)
- func ValidateRegistration(c *gin.Context)
- func ValidateUpdateEmailAddress(c *gin.Context)
- func ValidateUpdatePassword(c *gin.Context)
- type Availability
- type CancelUserRegistrationFunc
- type CreateNewProcessFunc
- type CreateNewProcessWithValueFunc
- type DeleteForgotPasswordProcessFunc
- type DeleteProcessByIDFunc
- type DeleteTokenByIDFunc
- type DeleteUserByIDFunc
- type DeleteUserNotificationFunc
- type DisableUserByIDFunc
- type DoesAccountWithEmailAddressExistFunc
- type DoesAccountWithUsernameExistFunc
- type DoesUserWithSocialNetworkUserIDExistFunc
- type EnableUserByIDFunc
- type GetForgotPasswordProcessDetailsByIDFunc
- type GetOwnedAccountDetailsFunc
- type GetOwnedTokenByIDFunc
- type GetOwnedTokensFunc
- type GetRegistrationDetailsFunc
- type GetTokenDetailsByIDFunc
- type GetTokenExpirationDateFunc
- type GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUserFunc
- type GetUserDetailsByIDFunc
- type GetUserDetailsByIdentifierFunc
- type GetUserDetailsBySocialNetworkIDFunc
- type NewForgotPasswordProcessForUserFunc
- type NotificationReceivedByUserFunc
- type NotificationsReceivedByUserFunc
- type NotificationsSubscribedByUserFunc
- type RegisterByEmailAddressFunc
- type RegisterByThirdPartyTokenFunc
- type SaveAuthenticationTokenFunc
- type SaveSocialNetworkUserTokenDetailsToUserFunc
- type SubscribeNotificationsToUserFunc
- type UnsubscribeNotificationFromUserFunc
- type UpdateTokenByIDFunc
- type UpdateUserEmailAddressFunc
- type UpdateUserNotificationNotifiedFunc
- type UpdateUserNotificationReadFunc
- type UpdateUserPasswordFunc
- type UpdateUserSocialNetworksFunc
- type UpdatedAccountInfosFunc
- type UpdatedAccountSettingsFunc
- type UserEmailAddressIsVerifiedFunc
- type ValidateUserRegistrationFunc
- type VerifyProcessFunc
- type WrongAccessToForgotPasswordProcessFunc
Constants ¶
This section is empty.
Variables ¶
var ( // NotificationsReceivedByUser : function to get all the notifications received by the user. NotificationsReceivedByUser NotificationsReceivedByUserFunc // NotificationReceivedByUser : function to get a notification received by the user. NotificationReceivedByUser NotificationReceivedByUserFunc // UpdateUserNotificationRead : function to update the read flag of a notification received by the user. UpdateUserNotificationRead UpdateUserNotificationReadFunc // UpdateUserNotificationNotified : function to update the notified flag of a notification received by the user. UpdateUserNotificationNotified UpdateUserNotificationNotifiedFunc // DeleteUserNotification : function to delete a notification received by the user. DeleteUserNotification DeleteUserNotificationFunc // NotificationsSubscribedByUser : function to get all the notifications subscribed by the user. NotificationsSubscribedByUser NotificationsSubscribedByUserFunc // SubscribeNotificationsToUser : function to subscribe some notifications to the user. SubscribeNotificationsToUser SubscribeNotificationsToUserFunc // UnsubscribeNotificationFromUser : function to unsubscribe a notification from a user. UnsubscribeNotificationFromUser UnsubscribeNotificationFromUserFunc // GetUserDetailsByIdentifier : function to get the user details from its identifier (username, email addresse, what you want.) GetUserDetailsByIdentifier GetUserDetailsByIdentifierFunc // GetUserDetailsByID : function to get the user details from its unique identifier. GetUserDetailsByID GetUserDetailsByIDFunc // GetUserDetailsByFacebookUserID : function to get the user details from its unique facebook identifier. GetUserDetailsByFacebookUserID GetUserDetailsBySocialNetworkIDFunc // GetUserDetailsByGoogleUserID : function to get the user details from its unique facebook identifier. GetUserDetailsByGoogleUserID GetUserDetailsBySocialNetworkIDFunc // GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUser : function to get the user details from its identifier (username, email addresse, what you want.) GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUser GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUserFunc // NewForgotPasswordProcessForUser : function to create a new forgot password process for a user. Return the unique identifier of the process. NewForgotPasswordProcessForUser NewForgotPasswordProcessForUserFunc // GetForgotPasswordProcessDetailsByID : function to get the forgot password process details from its identifier. GetForgotPasswordProcessDetailsByID GetForgotPasswordProcessDetailsByIDFunc // WrongAccessToForgotPasswordProcess : function to avoid brute force, increment tries or delete the process. WrongAccessToForgotPasswordProcess WrongAccessToForgotPasswordProcessFunc // UpdateUserPassword : function to update the password of an user. UpdateUserPassword UpdateUserPasswordFunc // UpdateUserEmailAddress : function to update the email address of an user. UpdateUserEmailAddress UpdateUserEmailAddressFunc // UserEmailAddressIsVerified : function to flag the email address of a user as valid. UserEmailAddressIsVerified UserEmailAddressIsVerifiedFunc // UpdateUserSocialNetworks : updates the social network accounts of the user. UpdateUserSocialNetworks UpdateUserSocialNetworksFunc // DeleteForgotPasswordProcess : function to delete a forgot password process by ID. DeleteForgotPasswordProcess DeleteForgotPasswordProcessFunc // ValidateUserRegistration : function to validate the registration of a user by its ID. ValidateUserRegistration ValidateUserRegistrationFunc // CancelUserRegistration : function to cancel the registration of a user by its ID. CancelUserRegistration CancelUserRegistrationFunc // GetRegistrationDetails : function to get the details of the registration of a user. GetRegistrationDetails GetRegistrationDetailsFunc // SaveAuthenticationToken : function to save the authentication details and return the unique ID. SaveAuthenticationToken SaveAuthenticationTokenFunc // DoesAccountWithUsernameExist : returns true if an account with this username does exist already. DoesAccountWithUsernameExist DoesAccountWithUsernameExistFunc // DoesAccountWithEmailAddressExist : returns true if an account with this email address does exist already. DoesAccountWithEmailAddressExist DoesAccountWithEmailAddressExistFunc // RegisterByEmailAddress : saves a newly registered user. RegisterByEmailAddress RegisterByEmailAddressFunc // RegisterByThirdPartyToken : saves a newly registered user. RegisterByThirdPartyToken RegisterByThirdPartyTokenFunc // DoesUserWithFacebookUserIDExist : return true if a user with a facebook user id is registered already. DoesUserWithFacebookUserIDExist DoesUserWithSocialNetworkUserIDExistFunc // DoesUserWithGoogleUserIDExist : return true if a user with a google user id is registered already. DoesUserWithGoogleUserIDExist DoesUserWithSocialNetworkUserIDExistFunc // SaveFacebookUserTokenDetailsToUser : function to save the auth token details from facebook to an account. SaveFacebookUserTokenDetailsToUser SaveSocialNetworkUserTokenDetailsToUserFunc // SaveGoogleUserTokenDetailsToUser : function to save the auth token details from google to an account. SaveGoogleUserTokenDetailsToUser SaveSocialNetworkUserTokenDetailsToUserFunc // GetTokenExpirationDate : function to get the expiration date of a token from its unique identifier. GetTokenExpirationDate GetTokenExpirationDateFunc // DeleteTokenByID : delete an auth token by its ID. DeleteTokenByID DeleteTokenByIDFunc // GetTokenDetailsByID : function to get the token details from its unique identifier. GetTokenDetailsByID GetTokenDetailsByIDFunc // GetOwnedTokens : function to get the auth tokens of a user. GetOwnedTokens GetOwnedTokensFunc // GetOwnedTokenByID : function to get the auth token by its ID and the ID of the token's owner. GetOwnedTokenByID GetOwnedTokenByIDFunc // UpdateTokenByID : function to update the properties of a token. UpdateTokenByID UpdateTokenByIDFunc // GetOwnedAccountDetails : function to get the user details from its unique identifier. GetOwnedAccountDetails GetOwnedAccountDetailsFunc // UpdatedAccountInfos : function to update the user infos. UpdatedAccountInfos UpdatedAccountInfosFunc // UpdatedAccountSettings : function to update the user settings. UpdatedAccountSettings UpdatedAccountSettingsFunc // CreateNewDeleteAccountProcess : function to start a new process to delete an account. CreateNewDeleteAccountProcess CreateNewProcessFunc // CreateNewDisableAccountProcess : function to start a new process to disable an account. CreateNewDisableAccountProcess CreateNewProcessFunc // CreateNewUpdatePasswordProcess : function to start a new process to update the password of an account. CreateNewUpdatePasswordProcess CreateNewProcessWithValueFunc // CreateNewUpdateEmailAddressProcess : function to start a new process to update the email address of an account. CreateNewUpdateEmailAddressProcess CreateNewProcessWithValueFunc // CreateNewVerifyEmailAddressProcess : function to start a new process to verify the email address of an account. CreateNewVerifyEmailAddressProcess CreateNewProcessFunc // VerifyProcess : function to verify a process and get the ID of the bound user. VerifyProcess VerifyProcessFunc // DeleteProcessByID : deletes a process by its ID. DeleteProcessByID DeleteProcessByIDFunc // DeleteUserByID : deletes a user by its ID. DeleteUserByID DeleteUserByIDFunc // DisableUserByID : disables a user by its ID. DisableUserByID DisableUserByIDFunc // EnableUserByID : enables a user by its ID. EnableUserByID EnableUserByIDFunc )
Functions ¶
func CancelDeleteAccount ¶
CancelDeleteAccount : cancels the delete process.
func CancelDisableAccount ¶
CancelDisableAccount : cancels the disable process.
func CancelForgotPassword ¶
CancelForgotPassword : cancels the reset password.
func CancelRegistration ¶
CancelRegistration cancels a new account.
func CancelUpdateEmailAddress ¶
CancelUpdateEmailAddress : cancels the email address update.
func CancelUpdatePassword ¶
CancelUpdatePassword : cancels the password update.
func CheckUsernameParameter ¶
CheckUsernameParameter : checks the username parameter.
func ConfirmEmailAddress ¶
ConfirmEmailAddress : validates the new email address.
func DeleteAccount ¶
DeleteAccount : starts the delete processus and sends a mail to confirm.
func DeleteAuthToken ¶
DeleteAuthToken : revokes a token from an account.
func DeleteAuthTokenWithKey ¶
DeleteAuthTokenWithKey : revokes a token from an account with a key.
func DeleteNotification ¶
DeleteNotification : deletes a notification object.
func DisableAccount ¶
DisableAccount : starts the disable processus and sends a mail to confirm.
func ForgotPassword ¶
ForgotPassword : sends a mail to reset the password.
func GetAuthToken ¶
GetAuthToken : gets the token properties of an account.
func GetAuthTokens ¶
GetAuthTokens : gets the tokens of an account.
func GetAvailability ¶
GetAvailability : returns true if the username is available.
func GetNotification ¶
GetNotification : returns a notification received by the user.
func GetNotifications ¶
GetNotifications : returns the latest notifications received by the user.
func GetNotificationsSettings ¶
GetNotificationsSettings : returns all the notifications received or not by the user's devices.
func LoginWithFacebook ¶
LoginWithFacebook : creates a token to log in an account.
func LoginWithGoogle ¶
LoginWithGoogle : creates a token to log in an account.
func LoginWithPassword ¶
LoginWithPassword : creates a token to log in an account.
func RefreshAuthToken ¶
RefreshAuthToken : refreshes a auth token.
func RegisterWithFacebook ¶
RegisterWithFacebook creates a new account.
func RegisterWithGoogle ¶
RegisterWithGoogle creates a new account.
func RegisterWithPassword ¶
RegisterWithPassword creates a new account.
func SaveNotificationsSettings ¶
SaveNotificationsSettings : saves all the notifications received by the user's devices.
func UnsubscribeNotificationByKey ¶
UnsubscribeNotificationByKey : unsubscribes from an encrypted key.
func UpdateAuthToken ¶
UpdateAuthToken : updates a token of an account.
func UpdateEmailAddress ¶
UpdateEmailAddress : updates the email address and sends a mail to confirm.
func UpdateInfos ¶
UpdateInfos : updated the details of an account.
func UpdateNotificationNotified ¶
UpdateNotificationNotified : updates a notification object.
func UpdateNotificationRead ¶
UpdateNotificationRead : updates a notification object.
func UpdatePassword ¶
UpdatePassword : updates the password and sends a mail to confirm.
func UpdateSettings ¶
UpdateSettings : updated the settings of an account.
func UpdateSocialNetworks ¶
UpdateSocialNetworks : updates the social network profiles of the user.
func ValidateDeleteAccount ¶
ValidateDeleteAccount : confirms the delete process.
func ValidateDisableAccount ¶
ValidateDisableAccount : confirms the disable process.
func ValidateForgotPassword ¶
ValidateForgotPassword : validates the reset password.
func ValidateNewEmailAddress ¶
ValidateNewEmailAddress : valiadtes the new email address.
func ValidateRegistration ¶
ValidateRegistration validates a new account.
func ValidateUpdateEmailAddress ¶
ValidateUpdateEmailAddress : confirms the email address update.
func ValidateUpdatePassword ¶
ValidateUpdatePassword : confirms the password update.
Types ¶
type Availability ¶
Availability : struct
type CancelUserRegistrationFunc ¶
CancelUserRegistrationFunc : function to cancel the registration of a user by its ID.
type CreateNewProcessFunc ¶
type CreateNewProcessFunc func(c *gin.Context, userID string) (processID, processKey string, err error)
CreateNewProcessFunc : function to start a new process bound to a user.
type CreateNewProcessWithValueFunc ¶
type CreateNewProcessWithValueFunc func(c *gin.Context, userID, value string) (processID, processKey string, err error)
CreateNewProcessWithValueFunc : function to start a new process bound to a user.
type DeleteForgotPasswordProcessFunc ¶
DeleteForgotPasswordProcessFunc : function to delete a forgot password process by ID.
type DeleteProcessByIDFunc ¶
DeleteProcessByIDFunc : deletes a process by its ID.
type DeleteTokenByIDFunc ¶
DeleteTokenByIDFunc : delete an auth token by its ID.
type DeleteUserByIDFunc ¶
DeleteUserByIDFunc : deletes a user by its ID.
type DeleteUserNotificationFunc ¶
DeleteUserNotificationFunc : function to delete a notification received by the user.
type DisableUserByIDFunc ¶
DisableUserByIDFunc : disables a user by its ID.
type DoesAccountWithEmailAddressExistFunc ¶
DoesAccountWithEmailAddressExistFunc : returns true if an account with this email address does exist already.
type DoesAccountWithUsernameExistFunc ¶
DoesAccountWithUsernameExistFunc : returns true if an account with this username does exist already.
type DoesUserWithSocialNetworkUserIDExistFunc ¶
DoesUserWithSocialNetworkUserIDExistFunc : function to know if a user with a social network user id is registered already.
type EnableUserByIDFunc ¶
EnableUserByIDFunc : enables a user by its ID.
type GetForgotPasswordProcessDetailsByIDFunc ¶
type GetForgotPasswordProcessDetailsByIDFunc func(c *gin.Context, processID string) (userID, processPrivateKey string, err error)
GetForgotPasswordProcessDetailsByIDFunc : function to get the forgot password process details from its identifier.
type GetOwnedAccountDetailsFunc ¶
GetOwnedAccountDetailsFunc : function to get the user details from its unique identifier.
type GetOwnedTokenByIDFunc ¶
type GetOwnedTokenByIDFunc func(c *gin.Context, tokenID string) (token interface{}, ownerID string, err error)
GetOwnedTokenByIDFunc : function to get the auth token by its ID and the ID of the token's owner.
type GetOwnedTokensFunc ¶
GetOwnedTokensFunc : function to get the auth tokens of a user.
type GetRegistrationDetailsFunc ¶
type GetRegistrationDetailsFunc func(c *gin.Context, userID string) (*authentication.Details, error)
GetRegistrationDetailsFunc : function to get the details of the registration of a user.
type GetTokenDetailsByIDFunc ¶
GetTokenDetailsByIDFunc : function to get the token details from its unique identifier.
type GetTokenExpirationDateFunc ¶
GetTokenExpirationDateFunc : function to get the expiration date of a token from its unique identifier.
type GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUserFunc ¶
type GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUserFunc func(c *gin.Context, identifier string) (authentication.User, string, error)
GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUserFunc : function to get the user details and its encrypted password from its identifier (username, email addresse, what you want.)
type GetUserDetailsByIDFunc ¶
GetUserDetailsByIDFunc : function to get the user details from its unique identifier.
type GetUserDetailsByIdentifierFunc ¶
type GetUserDetailsByIdentifierFunc func(c *gin.Context, identifier string) (authentication.User, error)
GetUserDetailsByIdentifierFunc : function to get the user details from its identifier (username, email addresse, what you want.)
type GetUserDetailsBySocialNetworkIDFunc ¶
type GetUserDetailsBySocialNetworkIDFunc func(c *gin.Context, userID string) (authentication.User, error)
GetUserDetailsBySocialNetworkIDFunc : function to get the user details from its unique social network identifier.
type NewForgotPasswordProcessForUserFunc ¶
type NewForgotPasswordProcessForUserFunc func(c *gin.Context, userID, processPrivateKey string) (string, error)
NewForgotPasswordProcessForUserFunc : function to create a new forgot password process for a user. Return the unique identifier of the process.
type NotificationReceivedByUserFunc ¶
type NotificationReceivedByUserFunc func(c *gin.Context, userID, notificationID string) (interface{}, error)
NotificationReceivedByUserFunc : function to get a notification received by the user.
type NotificationsReceivedByUserFunc ¶
NotificationsReceivedByUserFunc : function to get all the notifications received by the user.
type NotificationsSubscribedByUserFunc ¶
NotificationsSubscribedByUserFunc : function to get all the notifications subscribed by the user.
type RegisterByEmailAddressFunc ¶
type RegisterByEmailAddressFunc func(c *gin.Context, username, encryptedPassword, emailAddress, locale, termsVersion, registrationCode, privateKey, source, ip string, device authentication.Device) error
RegisterByEmailAddressFunc : saves a newly registered user.
type RegisterByThirdPartyTokenFunc ¶
type RegisterByThirdPartyTokenFunc func(c *gin.Context, username string, tokenInfos validator.TokenInfos, tokenSource, locale, termsVersion, registrationCode, privateKey, source, ip string, device authentication.Device) error
RegisterByThirdPartyTokenFunc : saves a newly registered user.
type SaveAuthenticationTokenFunc ¶
type SaveAuthenticationTokenFunc func(c *gin.Context, details authentication.Details) (tokenID string, knownIPAddress bool, err error)
SaveAuthenticationTokenFunc : function to save the authentication details and return the unique ID.
type SaveSocialNetworkUserTokenDetailsToUserFunc ¶
type SaveSocialNetworkUserTokenDetailsToUserFunc func(c *gin.Context, userID string, tokenInfos validator.TokenInfos) error
SaveSocialNetworkUserTokenDetailsToUserFunc : function to save the auth token details from a social network to an account.
type SubscribeNotificationsToUserFunc ¶
type SubscribeNotificationsToUserFunc func(c *gin.Context, userID string, notifications []string) error
SubscribeNotificationsToUserFunc : function to subscribe some notifications to the user.
type UnsubscribeNotificationFromUserFunc ¶
type UnsubscribeNotificationFromUserFunc func(c *gin.Context, userID, notification, unsubscribeKey string) error
UnsubscribeNotificationFromUserFunc : function to unsubscribe a notification from a user.
type UpdateTokenByIDFunc ¶
type UpdateTokenByIDFunc func(c *gin.Context, tokenID, name string, enableNotifications bool, notifications []string) error
UpdateTokenByIDFunc : function to update the properties of a token.
type UpdateUserEmailAddressFunc ¶
UpdateUserEmailAddressFunc : function to update the email address of an user.
type UpdateUserNotificationNotifiedFunc ¶
UpdateUserNotificationNotifiedFunc : function to update the notified flag of a notification received by the user.
type UpdateUserNotificationReadFunc ¶
UpdateUserNotificationReadFunc : function to update the read flag of a notification received by the user.
type UpdateUserPasswordFunc ¶
type UpdateUserPasswordFunc func(c *gin.Context, userID, password string, isPasswordEncrypted bool) error
UpdateUserPasswordFunc : function to update the password of an user.
type UpdateUserSocialNetworksFunc ¶
type UpdateUserSocialNetworksFunc func(c *gin.Context, userID, facebook, twitter, instagram string) error
UpdateUserSocialNetworksFunc : updates the social network accounts of the user.
type UpdatedAccountInfosFunc ¶
UpdatedAccountInfosFunc : function to update the user infos.
type UpdatedAccountSettingsFunc ¶
UpdatedAccountSettingsFunc : function to update the user settings.
type UserEmailAddressIsVerifiedFunc ¶
UserEmailAddressIsVerifiedFunc : function to flag the email address of a user as valid.
type ValidateUserRegistrationFunc ¶
ValidateUserRegistrationFunc : function to validate the registration of a user by its ID.
type VerifyProcessFunc ¶
type VerifyProcessFunc func(c *gin.Context, processID, key string) (userID, newValue string, err error)
VerifyProcessFunc : function to verify a process and get the ID of the bound user.
type WrongAccessToForgotPasswordProcessFunc ¶
WrongAccessToForgotPasswordProcessFunc : function to avoid brute force, increment tries or delete the process.
Source Files ¶
- auth_token.go
- delete.go
- disable.go
- email_address.go
- forgot_password.go
- management.go
- notifications.go
- password.go
- private_auth_tokens.go
- private_common.go
- private_email_address.go
- private_forgot_password.go
- private_login.go
- private_notifications.go
- private_registration.go
- public.go
- registration.go
- social_networks.go
- types_functions.go
- types_username.go
- username.go
- variables.go