Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webauthn-demo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Josh Ji
webauthn-demo
Commits
8ac11886
Commit
8ac11886
authored
Nov 22, 2021
by
0Tyler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add UserProxyService to get username
parent
e0ce6997
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/main/java/com/google/webauthn/gaedemo/servlets/RemoveCredential.java
...om/google/webauthn/gaedemo/servlets/RemoveCredential.java
+9
-0
No files found.
src/main/java/com/google/webauthn/gaedemo/servlets/RemoveCredential.java
View file @
8ac11886
...
...
@@ -14,8 +14,10 @@
package
com.google.webauthn.gaedemo.servlets
;
import
com.google.appengine.api.users.User
;
import
com.google.appengine.api.users.UserService
;
import
com.google.appengine.api.users.UserServiceFactory
;
import
com.google.webauthn.gaedemo.service.UserProxyService
;
import
com.google.webauthn.gaedemo.storage.Credential
;
import
java.io.IOException
;
import
java.util.List
;
...
...
@@ -42,7 +44,14 @@ public class RemoveCredential extends HttpServlet {
@Override
protected
void
doGet
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
IOException
{
/* Tyler start -----------------*/
UserProxyService
userProxyService
=
UserProxyService
.
getInstance
();
User
user
=
userProxyService
.
getCurrentUser
();
String
currentUser
=
(
user
!=
null
)
?
user
.
getEmail
()
:
userService
.
getCurrentUser
().
getEmail
();
/* Tyler end -----------------*/
/* Original code
String currentUser = userService.getCurrentUser().getEmail();
*/
Credential
.
remove
(
currentUser
,
request
.
getParameter
(
"id"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment