Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
a2f482b7
Commit
a2f482b7
authored
Apr 12, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5053 from spauk/master
* pull5053: Make UserInfoTokenServices.getPrincipal protected
parents
b1656be3
8542f4f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
UserInfoTokenServices.java
...igure/security/oauth2/resource/UserInfoTokenServices.java
+7
-1
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServices.java
View file @
a2f482b7
...
@@ -99,7 +99,13 @@ public class UserInfoTokenServices implements ResourceServerTokenServices {
...
@@ -99,7 +99,13 @@ public class UserInfoTokenServices implements ResourceServerTokenServices {
return
new
OAuth2Authentication
(
request
,
token
);
return
new
OAuth2Authentication
(
request
,
token
);
}
}
private
Object
getPrincipal
(
Map
<
String
,
Object
>
map
)
{
/**
* Return the principal that should be used for the token. The default implementation
* looks for well know {@code user*} keys in the map.
* @param map the source map
* @return the principal or {@literal "unknown"}
*/
protected
Object
getPrincipal
(
Map
<
String
,
Object
>
map
)
{
for
(
String
key
:
PRINCIPAL_KEYS
)
{
for
(
String
key
:
PRINCIPAL_KEYS
)
{
if
(
map
.
containsKey
(
key
))
{
if
(
map
.
containsKey
(
key
))
{
return
map
.
get
(
key
);
return
map
.
get
(
key
);
...
...
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