Documentation
¶
Index ¶
- Variables
- func AdminAddUserToGroup(username string, groupName string) (string, error)
- func AdminCreateUser(username string, temporaryPassword string) (string, error)
- func AdminDeleteUser(username string) (string, error)
- func AdminRemoveUserFromGroup(username string, groupName string) (string, error)
- func CognitoErrorDetails(err error) (string, string)
- func CreateUserGroup(groupName string, description string, precedence int64) (string, error)
- func DeleteUserGroup(groupName string) (string, error)
- func ForceChangePassword(session string, username string, password string) (string, error)
- type CognitoAuth
- func (self *CognitoAuth) ChangePassword(currentPassword string, newPassword string, accessToken string) (string, error)
- func (self *CognitoAuth) ConfirmForgotPassword(username string, confirmationCode string, password string) (string, error)
- func (self *CognitoAuth) ConfirmSignUp(username string, confirmationCode string) (string, error)
- func (self *CognitoAuth) ForgotPassword(username string) (string, error)
- func (self *CognitoAuth) RefreshTokenAuth(refreshToken string) (map[string]string, error)
- func (self *CognitoAuth) ResendConfirmationCode(username string) (string, error)
- func (self *CognitoAuth) SignIn(username string, password string) (map[string]string, error)
- func (self *CognitoAuth) SignUp(username string, password string) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CognitoClient *cognitoidp.CognitoIdentityProvider = cognitoidp.New(awsSession())
Cognito client
Functions ¶
func AdminAddUserToGroup ¶
Add a user to a group
func AdminCreateUser ¶
Admin creates user with a temporary password
func AdminDeleteUser ¶
Admin deletes a user from the User Pool
func AdminRemoveUserFromGroup ¶
Remove a user from a group
func CognitoErrorDetails ¶
Extracts `error code` and `error message` from the `awserr`
func CreateUserGroup ¶
Create a user group
Types ¶
type CognitoAuth ¶
type CognitoAuth struct { // Interface that provides AWS Cognito API methods (client) Client cognitoidpiface.CognitoIdentityProviderAPI // AWS Cognito User Pool ID UserPoolId string // AWS Cognito User Pool's App Client ID AppClientId string }
func NewCognitoAuth ¶
func NewCognitoAuth() CognitoAuth
func (*CognitoAuth) ChangePassword ¶
func (self *CognitoAuth) ChangePassword(currentPassword string, newPassword string, accessToken string) (string, error)
Change password staying signed in
func (*CognitoAuth) ConfirmForgotPassword ¶
func (self *CognitoAuth) ConfirmForgotPassword(username string, confirmationCode string, password string) (string, error)
Users can reset password using the verification code sent to their email
func (*CognitoAuth) ConfirmSignUp ¶
func (self *CognitoAuth) ConfirmSignUp(username string, confirmationCode string) (string, error)
Confirm Signup by providing a confirmation email sent to the user email
func (*CognitoAuth) ForgotPassword ¶
func (self *CognitoAuth) ForgotPassword(username string) (string, error)
Send a verification code to users' `email` to reset password
func (*CognitoAuth) RefreshTokenAuth ¶
func (self *CognitoAuth) RefreshTokenAuth(refreshToken string) (map[string]string, error)
Get new `accessToken` and `idToken` using the `refreshToken`
func (*CognitoAuth) ResendConfirmationCode ¶
func (self *CognitoAuth) ResendConfirmationCode(username string) (string, error)
Resend a verification code to user's `email`
Click to show internal directories.
Click to hide internal directories.