<b:beans xmlns:b="http://www.springframework.org/schema/beans"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xmlns="http://www.springframework.org/schema/security"
		 xsi:schemaLocation="
			http://www.springframework.org/schema/security
			https://www.springframework.org/schema/security/spring-security.xsd
			http://www.springframework.org/schema/beans
			https://www.springframework.org/schema/beans/spring-beans.xsd">

	<http auto-config="true">
		<intercept-url pattern="/**" access="authenticated"/>
		<oauth2-login authorized-client-repository-ref="authorizedClientRepository"/>
	</http>

	<client-registrations>
		<client-registration registration-id="google"
							 client-id="your-app-client-id"
							 client-secret="your-app-client-secret"
							 provider-id="google"/>
		<client-registration registration-id="github"
							 client-id="your-app-client-id"
							 client-secret="your-app-client-secret"
							 provider-id="github"/>
		<client-registration registration-id="facebook"
							 client-id="your-app-client-id"
							 client-secret="your-app-client-secret"
							 provider-id="facebook"/>
		<client-registration registration-id="okta"
							 client-id="your-app-client-id"
							 client-secret="your-app-client-secret"
							 provider-id="okta"/>
		<provider provider-id="okta"
				  authorization-uri="https://your-subdomain.oktapreview.com/oauth2/v1/authorize"
				  token-uri="https://your-subdomain.oktapreview.com/oauth2/v1/token"
				  user-info-uri="https://your-subdomain.oktapreview.com/oauth2/v1/userinfo"
				  jwk-set-uri="https://your-subdomain.oktapreview.com/oauth2/v1/keys"/>
	</client-registrations>

	<user-service>
		<user name="user" password="{noop}password" authorities="ROLE_USER" />
	</user-service>

	<b:bean id="authorizedClientService"
			class="org.springframework.security.oauth2.client.InMemoryOAuth2AuthorizedClientService"
			autowire="constructor"/>

	<b:bean id="authorizedClientRepository"
			class="org.springframework.security.oauth2.client.web.AuthenticatedPrincipalOAuth2AuthorizedClientRepository">
		<b:constructor-arg ref="authorizedClientService"/>
	</b:bean>

</b:beans>
