Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RPServer
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
RPServer
Commits
a958674b
Commit
a958674b
authored
Mar 16, 2023
by
Josh Ji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
id_from_idp frontend presentation
parent
7421569e
Pipeline
#3650
failed with stage
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
8 deletions
+15
-8
src/main/java/com/example/rpserver/controller/MakeCredential.java
.../java/com/example/rpserver/controller/MakeCredential.java
+1
-1
src/main/java/com/example/rpserver/controller/Profile.java
src/main/java/com/example/rpserver/controller/Profile.java
+4
-4
src/main/resources/static/js/webauthn.js
src/main/resources/static/js/webauthn.js
+4
-1
src/main/resources/templates/index.html
src/main/resources/templates/index.html
+3
-0
src/main/resources/templates/profile.html
src/main/resources/templates/profile.html
+3
-2
No files found.
src/main/java/com/example/rpserver/controller/MakeCredential.java
View file @
a958674b
...
@@ -134,7 +134,7 @@ public class MakeCredential {
...
@@ -134,7 +134,7 @@ public class MakeCredential {
user
.
getUserName
(),
user
.
getUserName
(),
rawId
));
rawId
));
return
ResponseEntity
.
ok
().
body
(
new
Response
(
true
,
"Successfully created credential
"
));
return
ResponseEntity
.
ok
().
body
(
new
Response
(
true
,
"Successfully created credential
@@"
+
identityFromIDP
));
}
}
private
String
[]
extractExtensions
(
byte
[]
attestationObjectBytes
){
private
String
[]
extractExtensions
(
byte
[]
attestationObjectBytes
){
...
...
src/main/java/com/example/rpserver/controller/Profile.java
View file @
a958674b
package
com.example.rpserver.controller
;
package
com.example.rpserver.controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMethod
;
@Controller
@Controller
public
class
Profile
{
public
class
Profile
{
@GetMapping
(
"/profile"
)
@GetMapping
(
"/profile"
)
public
String
profile
(){
public
String
profile
(
Model
model
,
@RequestParam
(
"id_from_idp"
)
String
id_from_idp
){
model
.
addAttribute
(
"id_from_idp"
,
id_from_idp
);
return
"profile"
;
return
"profile"
;
}
}
}
}
src/main/resources/static/js/webauthn.js
View file @
a958674b
...
@@ -445,7 +445,10 @@ function makeCredential(advancedOptions) {
...
@@ -445,7 +445,10 @@ function makeCredential(advancedOptions) {
console
.
log
(
parameters
);
console
.
log
(
parameters
);
if
(
parameters
&&
parameters
.
success
)
{
if
(
parameters
&&
parameters
.
success
)
{
showSuccessMsg
(
parameters
.
message
);
const
msg
=
parameters
.
message
.
split
(
"
@@
"
)[
0
]
showSuccessMsg
(
msg
);
document
.
forms
[
'
profile
'
][
'
id_from_idp
'
].
value
=
parameters
.
message
.
split
(
"
@@
"
)[
1
]
document
.
forms
[
'
profile
'
].
submit
()
fetchCredentials
();
fetchCredentials
();
}
else
{
}
else
{
throw
'
Unexpected response received.
'
;
throw
'
Unexpected response received.
'
;
...
...
src/main/resources/templates/index.html
View file @
a958674b
...
@@ -181,5 +181,8 @@
...
@@ -181,5 +181,8 @@
function
fetchCredentials
(){
function
fetchCredentials
(){
}
}
</script>
</script>
<form
action=
"profile"
name=
"profile"
>
<input
type=
"hidden"
name=
"id_from_idp"
>
</form>
</body>
</body>
</html>
</html>
src/main/resources/templates/profile.html
View file @
a958674b
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
>
<html
lang=
"en"
xmlns:th=
"https://www.thymeleaf.org"
>
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<title>
Profile
</title>
<title>
Profile
</title>
...
@@ -87,7 +87,8 @@
...
@@ -87,7 +87,8 @@
</h2>
</h2>
<hr>
<hr>
<img
src=
"img/avatar1.jpg"
alt=
"Avatar1"
>
<img
src=
"img/avatar1.jpg"
alt=
"Avatar1"
>
<h3
class=
"p-3"
>
Name: Josh Ji
</h3>
<h3
class=
"p-3"
>
Name:
</h3>
<h3
class=
"p-3"
th:text=
"${id_from_idp}"
>
Josh Ji
</h3>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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