Class OAuth2AccessTokenExtractor

java.lang.Object
com.github.scribejava.core.extractors.OAuth2AccessTokenExtractor
All Implemented Interfaces:
TokenExtractor<OAuth2AccessToken>

public class OAuth2AccessTokenExtractor
extends java.lang.Object
implements TokenExtractor<OAuth2AccessToken>
Custom implementation of TokenExtractor for OAuth 2.0
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    protected OAuth2AccessTokenExtractor()  
  • Method Summary

    Modifier and Type Method Description
    OAuth2AccessToken extract​(Response response)
    Extracts the concrete type of token from the contents of an Http Response
    static OAuth2AccessTokenExtractor instance()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OAuth2AccessTokenExtractor

      protected OAuth2AccessTokenExtractor()
  • Method Details

    • instance

      public static OAuth2AccessTokenExtractor instance()
    • extract

      public OAuth2AccessToken extract​(Response response) throws java.io.IOException
      Extracts the concrete type of token from the contents of an Http Response
      Specified by:
      extract in interface TokenExtractor<OAuth2AccessToken>
      Parameters:
      response - the whole response
      Returns:
      OAuth access token
      Throws:
      java.io.IOException - in case of troubles while getting body from the response