Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/IanLKaplan/CognitoDemo
/ functions
Functions
76 in github.com/IanLKaplan/CognitoDemo
⨍
Functions
76
◇
Types & classes
24
↓ 20 callers
Method
getSession
()
src/main/java/cognito_demo/services/SessionInfo.java:22
↓ 20 callers
Method
getUserName
()
src/main/java/cognito_demo/services/UserInfo.java:36
↓ 6 callers
Method
getEmailAddr
()
src/main/java/cognito_demo/services/UserInfo.java:40
↓ 5 callers
Method
getLocation
()
src/main/java/cognito_demo/services/UserInfo.java:44
↓ 4 callers
Method
getOldPassword
()
src/main/java/cognito_demo/services/PasswordRequest.java:26
↓ 4 callers
Method
sessionLogin
<blockquote> After a successful authentication, Amazon Cognito returns user pool tokens to your app. </blockquote> <blockquote> The ID Token contains
src/main/java/cognito_demo/services/AuthenticationService.java:218
↓ 3 callers
Method
getAccessToken
()
src/main/java/cognito_demo/services/SessionInfo.java:30
↓ 3 callers
Method
getNewPassword
()
src/main/java/cognito_demo/services/PasswordRequest.java:30
↓ 3 callers
Method
getUserInfo
<p> Get the information associated with the user. </p> @param userName the name of the user @return a UserInfo object if the information could be ret
src/main/java/cognito_demo/services/AuthenticationInterface.java:110
↓ 3 callers
Method
isValid
(String email)
src/main/java/cognito_demo/util/EmailValidator.java:42
↓ 2 callers
Method
changePassword
<p> Change the password for a logged in user. Unlike the forgotten password logic, this does not require an authentication code. </p> @param password
src/main/java/cognito_demo/services/AuthenticationInterface.java:142
↓ 2 callers
Method
findUserByEmailAddr
Find a user by email address. @param email @return @throws Exception
src/main/java/cognito_demo/services/AuthenticationInterface.java:55
↓ 2 callers
Method
forgotPassword
Support for resetting the user's password in the event that it was forgotten. @param userName @param resetCode @throws Exception
src/main/java/cognito_demo/services/AuthenticationInterface.java:99
↓ 2 callers
Method
getUserInfo
<p> Get the information associated with the user. </p> @param userName the name of the user to be returned @return a UserInfo object if the informati
src/main/java/cognito_demo/services/AuthenticationService.java:429
↓ 2 callers
Function
t
(t,e)
src/main/webapp/resources/js/kube-6.5.2.min.js:1
↓ 1 callers
Method
changeEmail
<p> Change the email address of a logged in user. </p> @param userName @param newEmailAddr @throws Exception
src/main/java/cognito_demo/services/AuthenticationInterface.java:152
↓ 1 callers
Method
changeFromTemporaryPassword
<p> Change the user's password from a temporary password to a new (permanent) password. </p>
src/main/java/cognito_demo/services/AuthenticationInterface.java:90
↓ 1 callers
Method
createNewUser
<p> Create a new user. </p>
src/main/java/cognito_demo/services/AuthenticationInterface.java:35
↓ 1 callers
Method
deleteUser
<p> Delete a user. Since deleting a user can be a "big deal" a password is required. </p> @param userName @param password
src/main/java/cognito_demo/services/AuthenticationInterface.java:45
↓ 1 callers
Function
e
()
src/main/webapp/resources/js/kube-6.5.2.min.js:1
↓ 1 callers
Method
findUserByEmailAddr
<p> Find a user by their email address. </p> @return a UserInfo object if the lookup succeeded or null if there was no user associated with that email
src/main/java/cognito_demo/services/AuthenticationService.java:462
↓ 1 callers
Method
getAmazonCognitoIdentityClient
<p> Build an AWS cognito identity provider, based on the parameters defined in the CognitoResources interface. </p> @return
src/main/java/cognito_demo/services/AuthenticationService.java:96
↓ 1 callers
Method
getChallengeResult
()
src/main/java/cognito_demo/services/SessionInfo.java:26
↓ 1 callers
Method
getCredentials
<p> Build an AWSCredentials object from the ID and secret key. </p> @param AWS_ID @param AWS_KEY @return an AWSCredentials object, initialized with t
src/main/java/cognito_demo/services/AuthenticationService.java:84
↓ 1 callers
Method
getNewPasswordRequired
()
src/main/java/cognito_demo/services/LoginInfo.java:38
↓ 1 callers
Method
getResetCode
()
src/main/java/cognito_demo/services/ResetPasswordRequest.java:26
↓ 1 callers
Method
hasUser
<p> Determine whether a user with userName exists in the login database. </p> @param userName @return true if the user exists, false otherwise.
src/main/java/cognito_demo/services/AuthenticationInterface.java:120
↓ 1 callers
Method
resetPassword
<p> Reset a user's password using an authentication code. </p> @param resetRequest @throws Exception
src/main/java/cognito_demo/services/AuthenticationInterface.java:131
↓ 1 callers
Method
setNewPasswordRequired
(Boolean newPasswordRequired)
src/main/java/cognito_demo/services/LoginInfo.java:42
↓ 1 callers
Method
updateUserAttributes
<p> Update selected user attributes. </p> @param newInfo @throws AWSCognitoIdentityProviderException
src/main/java/cognito_demo/services/AuthenticationInterface.java:65
↓ 1 callers
Method
userLogin
<p> Log a user into the system </p> @param userName @param password @return a LoginInfo object may include special context information.
src/main/java/cognito_demo/services/AuthenticationInterface.java:75
↓ 1 callers
Method
userLogout
<p> Log the user out. </p> @param userName
src/main/java/cognito_demo/services/AuthenticationInterface.java:83
Method
AuthenticationService
()
src/main/java/cognito_demo/services/AuthenticationService.java:68
Method
DuplicateEmailException
(final String errorMessage)
src/main/java/cognito_demo/services/DuplicateEmailException.java:34
Method
LoginInfo
(final String userName, final String email, final String location)
src/main/java/cognito_demo/services/LoginInfo.java:30
Method
PasswordRequest
(final String userName, final String oldPassword, final String newPassword)
src/main/java/cognito_demo/services/PasswordRequest.java:16
Method
ResetPasswordRequest
(final String userName, final String resetCode, final String newPassword)
src/main/java/cognito_demo/services/ResetPasswordRequest.java:16
Method
SessionInfo
(final String session, final String accessToken, final String challengeResult )
src/main/java/cognito_demo/services/SessionInfo.java:16
Method
UserInfo
(final String userName, final String emailAddr, final String location)
src/main/java/cognito_demo/services/UserInfo.java:30
Method
application
(ModelMap model, RedirectAttributes redirect, HttpServletRequest request )
src/main/java/cognito_demo/controller/ApplicationController.java:39
Method
changeEmail
<p> Change user's email address. The email address is a special attribute since it will be used for communication with the user. </p> <p> In this code
src/main/java/cognito_demo/services/AuthenticationService.java:333
Method
changeEmailRequest
(ModelMap model, HttpServletRequest request)
src/main/java/cognito_demo/controller/ChangeEmailController.java:42
Method
changeEmailRequestForm
(@RequestParam("email_addr") final String newEmailAddr, RedirectAttri
src/main/java/cognito_demo/controller/ChangeEmailController.java:56
Method
changeFromTemporaryPassword
<p> Change the user's password from a temporary password to a new (permanent) password. </p> <p> This function is called to set the password using the
src/main/java/cognito_demo/services/AuthenticationService.java:362
Method
changePassword
Display the change password form @return
src/main/java/cognito_demo/controller/ResetPasswordController.java:44
Method
changePassword
Display the change password form. This form is displayed differently for a forgotten password and for a password change for a logged in user (e.g., a
src/main/java/cognito_demo/controller/ChangePasswordController.java:37
Method
changePassword
<p> Change the password for a logged in user. Unlike the forgotten password logic, this does not require an emailed code to change the password. </p>
src/main/java/cognito_demo/services/AuthenticationService.java:300
Method
changePasswordForm
<p> Flash errors: </p> <ul> <li>user_name_error</li> <li>old_password_error</li> <li>new_password_error</li> <li>verify_password_error</li> <li>change
src/main/java/cognito_demo/controller/ResetPasswordController.java:70
Method
changePasswordForm
<p> Flash errors: </p> <ul> <li>user_name_error</li> <li>old_password_error</li> <li>new_password_error</li> <li>verify_password_error</li> <li>change
src/main/java/cognito_demo/controller/ChangePasswordController.java:71
Method
changeProfile
(ModelMap model, RedirectAttributes redirect, HttpServletRequest request)
src/main/java/cognito_demo/controller/ChangeProfileController.java:28
Method
changeProfileForm
<p> This is a demonstration for how to handle "profile" information. This consists of Cognito defined or custom attributes. In this demo application t
src/main/java/cognito_demo/controller/ChangeProfileController.java:51
Method
configure
(SpringApplicationBuilder application)
src/main/java/cognito_demo/CognitoDemoApplication.java:15
Method
contextLoads
()
src/test/java/cognito_demo/CognitoDemoApplicationTests.java:12
Method
createNewUser
<p> Create a new user. </p> <p> When a user is created in the Cognito user pool, the user account will be initially inactive. An email with a temporar
src/main/java/cognito_demo/services/AuthenticationService.java:137
Method
create_user
This is the web page display method (GET only) @param model @return
src/main/java/cognito_demo/controller/CreateUser.java:30
Method
deleteAccount
(Model model, HttpServletRequest request)
src/main/java/cognito_demo/controller/DeleteAccountController.java:41
Method
deleteAccountForm
(@RequestParam("password") final String password, RedirectAttributes redir
src/main/java/cognito_demo/controller/DeleteAccountController.java:52
Method
deleteUser
Delete an existing user. This code assumes that the operation is logically permitted (a user is only allowed to delete their own account, after
src/main/java/cognito_demo/services/AuthenticationService.java:174
Method
forgotPassword
<p> This function is called to reset the user's password if the password has been forgotten. The function will result in an email being sent to the us
src/main/java/cognito_demo/services/AuthenticationService.java:407
Method
getNewPassword
()
src/main/java/cognito_demo/services/ResetPasswordRequest.java:30
Method
getUserName
()
src/main/java/cognito_demo/services/PasswordRequest.java:22
Method
getUserName
()
src/main/java/cognito_demo/services/ResetPasswordRequest.java:22
Method
hasUser
<p> Determine whether a user with userName exists in the login database. </p> @param userName @return true if the user exists, false otherwise.
src/main/java/cognito_demo/services/AuthenticationService.java:511
Method
index
<p> Main index.html page. This page has the login dialog, which is processed (via a post) by the LoginController </p> @param model @return
src/main/java/cognito_demo/controller/IndexController.java:32
Method
login
<p> Handle the input (user, password) from the login form. </p> @param user @param password @param redirect @return
src/main/java/cognito_demo/controller/LoginController.java:50
Method
logoutPage
<p> Handle logout. </p> <p> The logout form is in this class since the class handles the application page. The processing for logout is simple, so the
src/main/java/cognito_demo/controller/ApplicationController.java:64
Method
main
(String[] args)
src/main/java/cognito_demo/CognitoDemoApplication.java:11
Method
new_user
<p> This method handles the data from the create user form. </p> @param userName @param emailAddr @param location @param redirect @return <p> Flash
src/main/java/cognito_demo/controller/CreateUser.java:57
Method
passwordResetPage
( Model model )
src/main/java/cognito_demo/controller/ForgotPasswordController.java:42
Method
resetPassword
<p> Reset the user's password using a code that they received via email. </p> @param resetRequest
src/main/java/cognito_demo/services/AuthenticationService.java:390
Method
resetPasswordForm
Given a user name, send an email with a password reset code. @param user @param redirect @return
src/main/java/cognito_demo/controller/ForgotPasswordController.java:55
Method
updateUserAttributes
Update user attributes associated with the user information stored in Cognito. Note that the email attribute is updated separately.
src/main/java/cognito_demo/services/AuthenticationService.java:192
Method
userLogin
<p> Log a user into the system using Cognito. </p> @param userName @param password @return a LoginInfo object that includes the access token which is
src/main/java/cognito_demo/services/AuthenticationService.java:255
Method
userLogout
<p> Log the user out. </p> @param userName @throws AWSCognitoIdentityProviderException
src/main/java/cognito_demo/services/AuthenticationService.java:282
Method
userNameLookup
(Model model)
src/main/java/cognito_demo/controller/UserNameLookupController.java:26
Method
userNameLookupForm
(@RequestParam("email_address") String emailAddr, RedirectA
src/main/java/cognito_demo/controller/UserNameLookupController.java:34