Fix typos in SAML 2 docs

This commit is contained in:
Eleftheria Stein 2021-06-08 15:28:40 +03:00
parent 20577c39c1
commit cf9071b0b2
1 changed files with 9 additions and 8 deletions

View File

@ -228,7 +228,7 @@ static {
} }
private void configureAuthnRequest(AuthnRequest authnRequest) { private void configureAuthnRequest(AuthnRequest authnRequest) {
authnRequest.setForceAuthN(true); authnRequest.setForceAuthn(true);
} }
} }
@ -447,11 +447,12 @@ RelyingPartyRegistration relyingPartyRegistration = RelyingPartyRegistration.wit
.entityId("{baseUrl}/{registrationId}") .entityId("{baseUrl}/{registrationId}")
.decryptionX509Credentials(c -> c.add(relyingPartyDecryptingCredential())) .decryptionX509Credentials(c -> c.add(relyingPartyDecryptingCredential()))
.assertionConsumerServiceLocation("/my-login-endpoint/{registrationId}") .assertionConsumerServiceLocation("/my-login-endpoint/{registrationId}")
.assertingParty(party -> party .assertingPartyDetails(party -> party
.entityId("https://ap.example.org") .entityId("https://ap.example.org")
.verificationX509Credentials(c -> c.add(assertingPartyVerifyingCredential())) .verificationX509Credentials(c -> c.add(assertingPartyVerifyingCredential()))
.singleSignOnServiceLocation("https://ap.example.org/SSO.saml2") .singleSignOnServiceLocation("https://ap.example.org/SSO.saml2")
); )
.build();
---- ----
[TIP] [TIP]
@ -622,12 +623,12 @@ private RelyingPartyRegistration.Builder
@Bean @Bean
public RelyingPartyRegistrationRepository relyingPartyRegistrations() { public RelyingPartyRegistrationRepository relyingPartyRegistrations() {
RelyingPartyRegistration okta = addRelyingPartyDetails( RelyingPartyRegistration okta = addRelyingPartyDetails(
RelyingPartyRegistration RelyingPartyRegistrations
.fromMetadataLocation(oktaMetadataUrl) .fromMetadataLocation(oktaMetadataUrl)
.registrationId("okta")).build(); .registrationId("okta")).build();
RelyingPartyRegistration azure = addRelyingPartyDetails( RelyingPartyRegistration azure = addRelyingPartyDetails(
RelyingPartyRegistration RelyingPartyRegistrations
.fromMetadataLocation(oktaMetadataUrl) .fromMetadataLocation(oktaMetadataUrl)
.registrationId("azure")).build(); .registrationId("azure")).build();
@ -752,7 +753,7 @@ public class AuthnRequestConverter implements
issuer.setValue(myContext.getIssuer()); issuer.setValue(myContext.getIssuer());
AuthnRequest authnRequest = authnRequestBuilder.buildObject(); AuthnRequest authnRequest = authnRequestBuilder.buildObject();
authnRequest.setIssuer(iss); authnRequest.setIssuer(issuer);
authnRequest.setDestination(myContext.getDestination()); authnRequest.setDestination(myContext.getDestination());
authnRequest.setAssertionConsumerServiceURL(myContext.getAssertionConsumerServiceUrl()); authnRequest.setAssertionConsumerServiceURL(myContext.getAssertionConsumerServiceUrl());
@ -913,7 +914,7 @@ provider.setAssertionValidator(assertionToken -> {
} catch (Exception e) { } catch (Exception e) {
return result.concat(new Saml2Error(INVALID_ASSERTION, e.getMessage())); return result.concat(new Saml2Error(INVALID_ASSERTION, e.getMessage()));
} }
return result.contact(new Saml2Error(INVALID_ASSERTION, context.getValidationFailureMessage())); return result.concat(new Saml2Error(INVALID_ASSERTION, context.getValidationFailureMessage()));
}); });
---- ----
@ -1019,7 +1020,7 @@ Saml2MetadataFilter filter = new Saml2MetadataFilter(
http http
// ... // ...
.saml2Login(withDefaults()) .saml2Login(withDefaults())
.addFilterBefore(new Saml2MetadataFilter(r), Saml2WebSsoAuthenticationFilter.class); .addFilterBefore(filter, Saml2WebSsoAuthenticationFilter.class);
---- ----
You can use this metadata endpoint to register your relying party with your asserting party. You can use this metadata endpoint to register your relying party with your asserting party.