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
a5a382b8
Commit
a5a382b8
authored
Jan 19, 2017
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set AccessTokenConverter if available
Fixes gh-7091
parent
e5e497ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
OAuth2AuthorizationServerConfiguration.java
...h2/authserver/OAuth2AuthorizationServerConfiguration.java
+8
-0
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/authserver/OAuth2AuthorizationServerConfiguration.java
View file @
a5a382b8
...
...
@@ -46,6 +46,7 @@ import org.springframework.security.oauth2.config.annotation.web.configuration.E
import
org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer
;
import
org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer
;
import
org.springframework.security.oauth2.provider.client.BaseClientDetails
;
import
org.springframework.security.oauth2.provider.token.AccessTokenConverter
;
import
org.springframework.security.oauth2.provider.token.TokenStore
;
/**
...
...
@@ -74,15 +75,19 @@ public class OAuth2AuthorizationServerConfiguration
private
final
TokenStore
tokenStore
;
private
final
AccessTokenConverter
tokenConverter
;
private
final
AuthorizationServerProperties
properties
;
public
OAuth2AuthorizationServerConfiguration
(
BaseClientDetails
details
,
AuthenticationManager
authenticationManager
,
ObjectProvider
<
TokenStore
>
tokenStore
,
ObjectProvider
<
AccessTokenConverter
>
tokenConverter
,
AuthorizationServerProperties
properties
)
{
this
.
details
=
details
;
this
.
authenticationManager
=
authenticationManager
;
this
.
tokenStore
=
tokenStore
.
getIfAvailable
();
this
.
tokenConverter
=
tokenConverter
.
getIfAvailable
();
this
.
properties
=
properties
;
}
...
...
@@ -120,6 +125,9 @@ public class OAuth2AuthorizationServerConfiguration
@Override
public
void
configure
(
AuthorizationServerEndpointsConfigurer
endpoints
)
throws
Exception
{
if
(
this
.
tokenConverter
!=
null
)
{
endpoints
.
accessTokenConverter
(
this
.
tokenConverter
);
}
if
(
this
.
tokenStore
!=
null
)
{
endpoints
.
tokenStore
(
this
.
tokenStore
);
}
...
...
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