org.keycloak.social

## Class AbstractOAuth2Provider

- java.lang.Object
- - org.keycloak.social.AbstractOAuth2Provider

- All Implemented Interfaces:
    SocialProvider
  Direct Known Subclasses:
    FacebookProvider, GitHubProvider, GoogleProvider

      public abstract class AbstractOAuth2Provider
      extends Object
      implements SocialProvider

  Author:
    Stian Thorgersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractOAuth2Provider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract String` | `getAuthUrl()`
    `AuthRequest` | `getAuthUrl(SocialProviderConfig config, String state)`
    `abstract String` | `getId()`
    `abstract String` | `getName()`
    `protected abstract SocialUser` | `getProfile(String accessToken)`
    `protected abstract String` | `getScope()`
    `protected abstract String` | `getTokenUrl()`
    `SocialUser` | `processCallback(SocialProviderConfig config, AuthCallback callback)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractOAuth2Provider

          public AbstractOAuth2Provider()

  - ### Method Detail

    - #### getId

          public abstract String getId()

      Specified by:
        `getId` in interface `SocialProvider`

    - #### getName

          public abstract String getName()

      Specified by:
        `getName` in interface `SocialProvider`

    - #### getScope

          protected abstract String getScope()

    - #### getAuthUrl

          protected abstract String getAuthUrl()

    - #### getTokenUrl

          protected abstract String getTokenUrl()

    - #### getProfile

          protected abstract SocialUser getProfile(String accessToken)
                                            throws SocialProviderException

      Throws:
        `SocialProviderException`

    - #### getAuthUrl

          public AuthRequest getAuthUrl(SocialProviderConfig config,
                               String state)
                                 throws SocialProviderException

      Specified by:
        `getAuthUrl` in interface `SocialProvider`
      Throws:
        `SocialProviderException`

    - #### processCallback

          public SocialUser processCallback(SocialProviderConfig config,
                                   AuthCallback callback)
                                     throws SocialProviderException

      Specified by:
        `processCallback` in interface `SocialProvider`
      Throws:
        `SocialProviderException`

Copyright © 2015. All Rights Reserved.