|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + ~ Copyright 2002-2021 the original author or authors. |
| 4 | + ~ |
| 5 | + ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | + ~ you may not use this file except in compliance with the License. |
| 7 | + ~ You may obtain a copy of the License at |
| 8 | + ~ |
| 9 | + ~ https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + ~ |
| 11 | + ~ Unless required by applicable law or agreed to in writing, software |
| 12 | + ~ distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + ~ See the License for the specific language governing permissions and |
| 15 | + ~ limitations under the License. |
| 16 | + --> |
| 17 | + |
| 18 | +<b:beans xmlns:b="http://www.springframework.org/schema/beans" |
| 19 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 20 | + xmlns="http://www.springframework.org/schema/security" |
| 21 | + xsi:schemaLocation=" |
| 22 | + http://www.springframework.org/schema/security |
| 23 | + https://www.springframework.org/schema/security/spring-security.xsd |
| 24 | + http://www.springframework.org/schema/beans |
| 25 | + https://www.springframework.org/schema/beans/spring-beans.xsd"> |
| 26 | + |
| 27 | + <relying-party-registrations id="registrations"> |
| 28 | + <relying-party-registration registration-id="one" |
| 29 | + entity-id="{baseUrl}/saml2/service-provider-metadata/{registrationId}" |
| 30 | + assertion-consumer-service-location="{baseUrl}/login/saml2/sso/{registrationId}" |
| 31 | + assertion-consumer-service-binding="REDIRECT" |
| 32 | + asserting-party-id="google"> |
| 33 | + <signing-credential |
| 34 | + certificate-location="classpath:org/springframework/security/config/saml2/rp-certificate.crt" |
| 35 | + private-key-location="classpath:org/springframework/security/config/saml2/rp-private.key"/> |
| 36 | + </relying-party-registration> |
| 37 | + <asserting-party asserting-party-id="google" entity-id="https://accounts.google.com/o/saml2/idp/entity-id" |
| 38 | + want-authn-requests-signed="true" |
| 39 | + single-sign-on-service-location="https://accounts.google.com/o/saml2/idp/sso-url" |
| 40 | + single-sign-on-service-binding="POST"> |
| 41 | + <verification-credential |
| 42 | + certificate-location="classpath:org/springframework/security/config/saml2/idp-certificate.crt" |
| 43 | + private-key-location="classpath:org/springframework/security/config/saml2/rp-private.key"/> |
| 44 | + <encryption-credential |
| 45 | + certificate-location="classpath:org/springframework/security/config/saml2/idp-certificate.crt" |
| 46 | + private-key-location="classpath:org/springframework/security/config/saml2/rp-private.key"/> |
| 47 | + </asserting-party> |
| 48 | + </relying-party-registrations> |
| 49 | + |
| 50 | + <b:bean class="org.springframework.security.saml2.provider.service.web.authentication.OpenSaml4AuthenticationRequestResolver"> |
| 51 | + <b:constructor-arg ref="registrations"/> |
| 52 | + <b:property name="relayStateResolver" ref="relayStateResolver"/> |
| 53 | + </b:bean> |
| 54 | + |
| 55 | + <b:bean name="relayStateResolver" class="org.mockito.Mockito" factory-method="mock"> |
| 56 | + <b:constructor-arg value="org.springframework.core.convert.converter.Converter" type="java.lang.Class"/> |
| 57 | + </b:bean> |
| 58 | +</b:beans> |
0 commit comments