anchor.diff:  
   It performs the following tasks:
   
  -. Registers a `ClientRegistrationRepository` `@Bean` composed of `ClientRegistration`(s) from the configured OAuth Client properties.
  -. Provides a `WebSecurityConfigurerAdapter` `@Configuration` and enables OAuth 2.0 Login via `httpSecurity.oauth2Login()`.
  -
  -If you need to override the Auto-configuration based on your specific requirements, you may do so in the following ways.
  -
  -- Register a `ClientRegistrationRepository` `@Bean`.
  +* Registers a `ClientRegistrationRepository` `@Bean` composed of `ClientRegistration`(s) from the configured OAuth Client properties.
  +* Provides a `WebSecurityConfigurerAdapter` `@Configuration` and enables OAuth 2.0 Login through `httpSecurity.oauth2Login()`.
  +
  +If you need to override the auto-configuration based on your specific requirements, you may do so in the following ways:
  +
  +* <<jc-oauth2login-register-clientregistrationrepository-bean>>
  +* <<jc-oauth2login-provide-websecurityconfigureradapter>>
  +* <<jc-oauth2login-completely-override-autoconfiguration>>
  +
  +
  +[[jc-oauth2login-register-clientregistrationrepository-bean]]
  +===== Register a `ClientRegistrationRepository` `@Bean`
  +
  +The following example shows how to register a `ClientRegistrationRepository` `@Bean`:
   
   [source,java]
   ----
  
positive.code:             client-id: google-client-id
              client-secret: google-client-secret
  ----
  
  Replace the values in the *client-id* and *client-secret* property with the OAuth 2.0 credentials created previously.
  
  [TIP]
  .OAuth Client properties
  ====
  <1> *_spring.security.oauth2.client.registration_* is the *base property prefix* for OAuth Client properties.
  <2> Following the *base property prefix* is the *_Id_* for the <<jc-oauth2login-client-registration,ClientRegistration>>, e.g. google.
  ====
  
  [[jc-oauth2login-sample-boot-application]]
  ===== Boot up the application
  
  Launch the Spring Boot 2.0 sample and go to *_"http://localhost:8080"_*.
  You'll then be redirected to the default _auto-generated_ login page displaying a link for Google.
  
  Click on the Google link and you'll then be redirected to Google for authentication.
  
  After authenticating using your Google account credentials, the next page presented to you will be the *Consent screen*.
  The Consent screen will ask you to either *_Allow_* or *_Deny_* access to the OAuth Client you created previously.
  Click *_Allow_* to authorize the OAuth Client to access your _email address_ and _basic profile_ information.
  
  At this point, the OAuth Client will retrieve your _email address_ and _basic profile_ information
  from the http://openid.net/specs/openid-connect-core-1_0.html#UserInfo[*UserInfo Endpoint*] and establish an *_authenticated session_*.
  
  [[jc-oauth2login-client-registration]]
  ==== ClientRegistration
  
  `ClientRegistration` is a representation of a client registered with an OAuth 2.0 or OpenID Connect 1.0 Provider.
  
  A client registration holds information such as _client id_, _client secret_,
  _authorization grant type_, _redirect uri_, _scope(s)_, _authorization uri_, _token uri_, etc.
  
  `ClientRegistration` and it's properties are defined as follows:
  
  [source,java]
  ----
  
negative.code: ----
  
  [[oauth2login-advanced-userinfo-endpoint]]
  === `UserInfo` Endpoint
  
  The `UserInfo` endpoint includes a number of configuration options, as described in the following sub-sections:
  
  * <<oauth2login-advanced-map-authorities>>
  * <<oauth2login-advanced-custom-user>>
  * <<oauth2login-advanced-oauth2-user-service>>
  * <<oauth2login-advanced-oidc-user-service>>
  
  
  [[oauth2login-advanced-map-authorities]]
  ==== Mapping User Authorities
  
  After the user successfully authenticates with the OAuth 2.0 Provider,
  the `OAuth2User.getAuthorities()` may be mapped to a new set of `GrantedAuthority` instances, which are then supplied to `OAuth2AuthenticationToken`.
  
  [TIP]
  `OAuth2AuthenticationToken.getAuthorities()` is used for authorizing requests, such as in `hasRole('USER')` or `hasRole('ADMIN')`.
  
  In order to map user authorities, you need to provide an implementation of `GrantedAuthoritiesMapper`
  and configure it as shown in the following example:
  
  [source,java]
  ----
  