Class OAuth2BearerFilter

  • All Implemented Interfaces:
    javax.ws.rs.client.ClientRequestFilter

    @Provider
    public class OAuth2BearerFilter
    extends Object
    implements javax.ws.rs.client.ClientRequestFilter
    Filter to simplify OAUTH2 authorization flows.

    It initiates OAUTH2 authentication requests to resolve a 'Bearer' token which is sub-sequently added as 'Authorization' request header.

    Since:
    9.2
    API:
    This is a public API.
    • Constructor Detail

      • OAuth2BearerFilter

        public OAuth2BearerFilter​(OAuth2TokenRequester getToken,
                                  OAuth2UriProvider uriFactory)
        Parameters:
        getToken - a OAuth2TokenRequester implementation that actually does the 'accessToken' call to the OAUTH2 authority in case the current session has not already a valid accessToken.
        uriFactory - an OAuth2UriProvider to setup OAUTH2 authority URIs for the various requests that may must be fired (.e.g /auth, /token, /userinfo, ...)
        API:
        This public API is available in Java.