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
3c0972e7
Commit
3c0972e7
authored
Feb 12, 2021
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Spring Security 5.5.0-M2
Closes gh-25255
parent
dadd6241
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
OAuth2ClientPropertiesRegistrationAdapterTests.java
...lient/OAuth2ClientPropertiesRegistrationAdapterTests.java
+8
-8
ReactiveOAuth2ClientAutoConfigurationTests.java
.../reactive/ReactiveOAuth2ClientAutoConfigurationTests.java
+2
-2
OAuth2WebSecurityConfigurationTests.java
...2/client/servlet/OAuth2WebSecurityConfigurationTests.java
+2
-2
build.gradle
spring-boot-project/spring-boot-dependencies/build.gradle
+1
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java
View file @
3c0972e7
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -86,7 +86,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
...
@@ -86,7 +86,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
assertThat
(
adapted
.
getClientId
()).
isEqualTo
(
"clientId"
);
assertThat
(
adapted
.
getClientId
()).
isEqualTo
(
"clientId"
);
assertThat
(
adapted
.
getClientSecret
()).
isEqualTo
(
"clientSecret"
);
assertThat
(
adapted
.
getClientSecret
()).
isEqualTo
(
"clientSecret"
);
assertThat
(
adapted
.
getClientAuthenticationMethod
())
assertThat
(
adapted
.
getClientAuthenticationMethod
())
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
POST
);
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
CLIENT_SECRET_
POST
);
assertThat
(
adapted
.
getAuthorizationGrantType
())
assertThat
(
adapted
.
getAuthorizationGrantType
())
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"https://example.com/redirect"
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"https://example.com/redirect"
);
...
@@ -116,7 +116,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
...
@@ -116,7 +116,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
assertThat
(
adapted
.
getClientId
()).
isEqualTo
(
"clientId"
);
assertThat
(
adapted
.
getClientId
()).
isEqualTo
(
"clientId"
);
assertThat
(
adapted
.
getClientSecret
()).
isEqualTo
(
"clientSecret"
);
assertThat
(
adapted
.
getClientSecret
()).
isEqualTo
(
"clientSecret"
);
assertThat
(
adapted
.
getClientAuthenticationMethod
())
assertThat
(
adapted
.
getClientAuthenticationMethod
())
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
BASIC
);
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
CLIENT_SECRET_
BASIC
);
assertThat
(
adapted
.
getAuthorizationGrantType
())
assertThat
(
adapted
.
getAuthorizationGrantType
())
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"{baseUrl}/{action}/oauth2/code/{registrationId}"
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"{baseUrl}/{action}/oauth2/code/{registrationId}"
);
...
@@ -146,7 +146,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
...
@@ -146,7 +146,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
assertThat
(
adapted
.
getClientId
()).
isEqualTo
(
"clientId"
);
assertThat
(
adapted
.
getClientId
()).
isEqualTo
(
"clientId"
);
assertThat
(
adapted
.
getClientSecret
()).
isEqualTo
(
"clientSecret"
);
assertThat
(
adapted
.
getClientSecret
()).
isEqualTo
(
"clientSecret"
);
assertThat
(
adapted
.
getClientAuthenticationMethod
())
assertThat
(
adapted
.
getClientAuthenticationMethod
())
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
POST
);
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
CLIENT_SECRET_
POST
);
assertThat
(
adapted
.
getAuthorizationGrantType
())
assertThat
(
adapted
.
getAuthorizationGrantType
())
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"https://example.com/redirect"
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"https://example.com/redirect"
);
...
@@ -187,7 +187,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
...
@@ -187,7 +187,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
assertThat
(
adapted
.
getClientId
()).
isEqualTo
(
"clientId"
);
assertThat
(
adapted
.
getClientId
()).
isEqualTo
(
"clientId"
);
assertThat
(
adapted
.
getClientSecret
()).
isEqualTo
(
"clientSecret"
);
assertThat
(
adapted
.
getClientSecret
()).
isEqualTo
(
"clientSecret"
);
assertThat
(
adapted
.
getClientAuthenticationMethod
())
assertThat
(
adapted
.
getClientAuthenticationMethod
())
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
BASIC
);
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
CLIENT_SECRET_
BASIC
);
assertThat
(
adapted
.
getAuthorizationGrantType
())
assertThat
(
adapted
.
getAuthorizationGrantType
())
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
.
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"{baseUrl}/{action}/oauth2/code/{registrationId}"
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"{baseUrl}/{action}/oauth2/code/{registrationId}"
);
...
@@ -254,7 +254,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
...
@@ -254,7 +254,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
.
getClientRegistrations
(
properties
);
.
getClientRegistrations
(
properties
);
ClientRegistration
adapted
=
registrations
.
get
(
"okta"
);
ClientRegistration
adapted
=
registrations
.
get
(
"okta"
);
ProviderDetails
providerDetails
=
adapted
.
getProviderDetails
();
ProviderDetails
providerDetails
=
adapted
.
getProviderDetails
();
assertThat
(
adapted
.
getClientAuthenticationMethod
()).
isEqualTo
(
ClientAuthenticationMethod
.
POST
);
assertThat
(
adapted
.
getClientAuthenticationMethod
()).
isEqualTo
(
ClientAuthenticationMethod
.
CLIENT_SECRET_
POST
);
assertThat
(
adapted
.
getAuthorizationGrantType
()).
isEqualTo
(
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getAuthorizationGrantType
()).
isEqualTo
(
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getRegistrationId
()).
isEqualTo
(
"okta"
);
assertThat
(
adapted
.
getRegistrationId
()).
isEqualTo
(
"okta"
);
assertThat
(
adapted
.
getClientName
()).
isEqualTo
(
issuer
);
assertThat
(
adapted
.
getClientName
()).
isEqualTo
(
issuer
);
...
@@ -283,7 +283,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
...
@@ -283,7 +283,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
registration
.
setProvider
(
provider
);
registration
.
setProvider
(
provider
);
registration
.
setClientId
(
"clientId"
);
registration
.
setClientId
(
"clientId"
);
registration
.
setClientSecret
(
"clientSecret"
);
registration
.
setClientSecret
(
"clientSecret"
);
registration
.
setClientAuthenticationMethod
(
"post"
);
registration
.
setClientAuthenticationMethod
(
"
client_secret_
post"
);
registration
.
setRedirectUri
(
"https://example.com/redirect"
);
registration
.
setRedirectUri
(
"https://example.com/redirect"
);
registration
.
setScope
(
Collections
.
singleton
(
"user"
));
registration
.
setScope
(
Collections
.
singleton
(
"user"
));
registration
.
setAuthorizationGrantType
(
"authorization_code"
);
registration
.
setAuthorizationGrantType
(
"authorization_code"
);
...
@@ -305,7 +305,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
...
@@ -305,7 +305,7 @@ class OAuth2ClientPropertiesRegistrationAdapterTests {
.
getClientRegistrations
(
properties
);
.
getClientRegistrations
(
properties
);
ClientRegistration
adapted
=
registrations
.
get
(
"okta"
);
ClientRegistration
adapted
=
registrations
.
get
(
"okta"
);
ProviderDetails
providerDetails
=
adapted
.
getProviderDetails
();
ProviderDetails
providerDetails
=
adapted
.
getProviderDetails
();
assertThat
(
adapted
.
getClientAuthenticationMethod
()).
isEqualTo
(
ClientAuthenticationMethod
.
BASIC
);
assertThat
(
adapted
.
getClientAuthenticationMethod
()).
isEqualTo
(
ClientAuthenticationMethod
.
CLIENT_SECRET_
BASIC
);
assertThat
(
adapted
.
getAuthorizationGrantType
()).
isEqualTo
(
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getAuthorizationGrantType
()).
isEqualTo
(
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getRegistrationId
()).
isEqualTo
(
"okta"
);
assertThat
(
adapted
.
getRegistrationId
()).
isEqualTo
(
"okta"
);
assertThat
(
adapted
.
getClientName
()).
isEqualTo
(
issuer
);
assertThat
(
adapted
.
getClientName
()).
isEqualTo
(
issuer
);
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientAutoConfigurationTests.java
View file @
3c0972e7
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -207,7 +207,7 @@ class ReactiveOAuth2ClientAutoConfigurationTests {
...
@@ -207,7 +207,7 @@ class ReactiveOAuth2ClientAutoConfigurationTests {
ClientRegistration
.
Builder
builder
=
ClientRegistration
.
withRegistrationId
(
id
);
ClientRegistration
.
Builder
builder
=
ClientRegistration
.
withRegistrationId
(
id
);
builder
.
clientName
(
"foo"
).
clientId
(
"foo"
)
builder
.
clientName
(
"foo"
).
clientId
(
"foo"
)
.
clientAuthenticationMethod
(
.
clientAuthenticationMethod
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
BASIC
)
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
CLIENT_SECRET_
BASIC
)
.
authorizationGrantType
(
AuthorizationGrantType
.
AUTHORIZATION_CODE
).
scope
(
"read"
)
.
authorizationGrantType
(
AuthorizationGrantType
.
AUTHORIZATION_CODE
).
scope
(
"read"
)
.
clientSecret
(
"secret"
).
redirectUri
(
"https://redirect-uri.com"
)
.
clientSecret
(
"secret"
).
redirectUri
(
"https://redirect-uri.com"
)
.
authorizationUri
(
"https://authorization-uri.com"
).
tokenUri
(
"https://token-uri.com"
)
.
authorizationUri
(
"https://authorization-uri.com"
).
tokenUri
(
"https://token-uri.com"
)
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/servlet/OAuth2WebSecurityConfigurationTests.java
View file @
3c0972e7
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -219,7 +219,7 @@ class OAuth2WebSecurityConfigurationTests {
...
@@ -219,7 +219,7 @@ class OAuth2WebSecurityConfigurationTests {
ClientRegistration
.
Builder
builder
=
ClientRegistration
.
withRegistrationId
(
id
);
ClientRegistration
.
Builder
builder
=
ClientRegistration
.
withRegistrationId
(
id
);
builder
.
clientName
(
"foo"
).
clientId
(
"foo"
)
builder
.
clientName
(
"foo"
).
clientId
(
"foo"
)
.
clientAuthenticationMethod
(
.
clientAuthenticationMethod
(
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
BASIC
)
org
.
springframework
.
security
.
oauth2
.
core
.
ClientAuthenticationMethod
.
CLIENT_SECRET_
BASIC
)
.
authorizationGrantType
(
AuthorizationGrantType
.
AUTHORIZATION_CODE
).
scope
(
"read"
)
.
authorizationGrantType
(
AuthorizationGrantType
.
AUTHORIZATION_CODE
).
scope
(
"read"
)
.
clientSecret
(
"secret"
).
redirectUri
(
"https://redirect-uri.com"
)
.
clientSecret
(
"secret"
).
redirectUri
(
"https://redirect-uri.com"
)
.
authorizationUri
(
"https://authorization-uri.com"
).
tokenUri
(
"https://token-uri.com"
)
.
authorizationUri
(
"https://authorization-uri.com"
).
tokenUri
(
"https://token-uri.com"
)
...
...
spring-boot-project/spring-boot-dependencies/build.gradle
View file @
3c0972e7
...
@@ -1687,7 +1687,7 @@ bom {
...
@@ -1687,7 +1687,7 @@ bom {
]
]
}
}
}
}
library
(
"Spring Security"
,
"5.5.0-M
1
"
)
{
library
(
"Spring Security"
,
"5.5.0-M
2
"
)
{
group
(
"org.springframework.security"
)
{
group
(
"org.springframework.security"
)
{
imports
=
[
imports
=
[
"spring-security-bom"
"spring-security-bom"
...
...
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