You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
open class MyUserDetailsResponseAuthenticationConverter(private val userDetailsService: UserDetailsService) : Converter<ResponseToken, Saml2Authentication> {
291
291
292
-
@Override
293
-
open fun convert(responseToken: ResponseToken): Saml2Authentication {
292
+
private val delegate = ResponseAuthenticationConverter()
293
+
294
+
override fun convert(responseToken: ResponseToken): Saml2Authentication {
294
295
val authentication = this.delegate.convert(responseToken) <1>
295
-
val principal = this.userDetailsService.loadByUsername(username) <2>
296
-
val saml2Response = authentication.getSaml2Response()
296
+
val username = authentication.name
297
+
val userDetails = this.userDetailsService.loadUserByUsername(username) <2>
298
+
val saml2Response = authentication.saml2Response
297
299
val assertion = OpenSamlResponseAssertionAccessor(
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/servlet/saml2/login/overview.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@ If any signature is invalid, authentication fails.
215
215
Also, if neither the response nor the assertions have signatures, authentication fails.
216
216
Either the response or all the assertions must have signatures.
217
217
218
-
image:{icondir}/number_7.png[] Then, the provider xref:servlet/saml2/login/authentication.adoc#servlet-saml2login-opensamlauthenticationprovider-decryption[,]decrypts any `EncryptedID` or `EncryptedAttribute` elements].
218
+
image:{icondir}/number_7.png[] Then, the provider xref:servlet/saml2/login/authentication.adoc#servlet-saml2login-opensamlauthenticationprovider-decryption[decrypts any `EncryptedID` or `EncryptedAttribute` elements].
219
219
If any decryptions fail, authentication fails.
220
220
221
221
image:{icondir}/number_8.png[] Next, the provider validates each assertion's `ExpiresAt` and `NotBefore` timestamps, the `<Subject>` and any `<AudienceRestriction>` conditions.
@@ -1039,4 +1039,4 @@ You can see a completed example of this in {gh-samples-url}/servlet/spring-boot/
1039
1039
1040
1040
In the event that you are migrating from the Spring Security SAML Extension, there may be some benefit to configuring your application to use the SAML Extension URI defaults.
1041
1041
1042
-
For more information on this, please see {gh-samples-url}/servlet/spring-boot/java/saml2/custom-urls[our `custom-urls` sample] and {gh-samples-url}/servlet/spring-boot/java/saml2/saml-extension-federation[our `saml-extension-federation` sample].
1042
+
For more information on this, please see {gh-samples-url}/servlet/spring-boot/java/saml2/saml-extension-urls[our `saml-extension-urls` sample] and {gh-samples-url}/servlet/spring-boot/java/saml2/saml-extension-federation[our `saml-extension-federation` sample].
0 commit comments