Loading src/main/java/com/inteligr8/rs/BearerTokenAuthorizationFilter.java +0 −3 Original line number Diff line number Diff line package com.inteligr8.rs; import java.io.UnsupportedEncodingException; import javax.ws.rs.client.ClientRequestContext; import javax.ws.rs.core.HttpHeaders; Loading Loading @@ -30,7 +28,6 @@ public class BearerTokenAuthorizationFilter implements AuthorizationFilter { * This method applies the 'Authorization' header to the {@link ClientRequestContext}. * * @param requestContext A request context. * @throws UnsupportedEncodingException The 'utf-8' encoding is not supported. */ @Override public void filter(ClientRequestContext requestContext) { Loading src/main/java/com/inteligr8/rs/ClientCxfConfiguration.java +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ public interface ClientCxfConfiguration extends ClientConfiguration { * wreck havoc on your implementation. This method allows you to * explicitly by-pass the default bus. * * @see https://cxf.apache.org/docs/bus-configuration.html * See https://cxf.apache.org/docs/bus-configuration.html. * * @return true to use the default bus; false otherwise. */ Loading src/main/java/com/inteligr8/rs/ClientJerseyImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ public abstract class ClientJerseyImpl extends Client implements InitializingBea this.register(); } /** * This method registers the Jersey library as the default provider for the * JAX-RS specification. */ public void register() { if (RuntimeDelegate.getInstance() == null) { this.logger.info("Setting JAX-RS runtime delegate to the Jersey library"); Loading src/main/java/com/inteligr8/rs/OAuthAuthorizationFilter.java +30 −2 Original line number Diff line number Diff line Loading @@ -27,14 +27,42 @@ public abstract class OAuthAuthorizationFilter implements AuthorizationFilter { private long expiration; private String refreshToken; /** * This constructor creates an OAuth-based authorization filter using the * OAuth identity provider token URL and a client ID registered with the * same OAuth identity provider. * * @param tokenUrl An OAuth identity provider token URL. * @param clientId An OAuth identity provider client ID. */ public OAuthAuthorizationFilter(String tokenUrl, String clientId) { this(tokenUrl, clientId, null); } /** * This constructor creates an OAuth-based authorization filter using the * OAuth identity provider token URL, client ID registered with the * same OAuth identity provider, and the corresponding client secret. * * @param tokenUrl An OAuth identity provider token URL. * @param clientId An OAuth identity provider client ID. * @param clientSecret A secret corresponding to the client ID. */ public OAuthAuthorizationFilter(String tokenUrl, String clientId, String clientSecret) { this(tokenUrl, clientId, clientSecret, null); } /** * This constructor creates an OAuth-based authorization filter using the * OAuth identity provider token URL, client ID registered with the * same OAuth identity provider, the corresponding client secret, and OAuth * scope. * * @param tokenUrl An OAuth identity provider token URL. * @param clientId An OAuth identity provider client ID. * @param clientSecret A secret corresponding to the client ID. * @param scope An OAuth scope. */ public OAuthAuthorizationFilter(String tokenUrl, String clientId, String clientSecret, String scope) { this.tokenUrl = tokenUrl; this.clientId = clientId; Loading Loading
src/main/java/com/inteligr8/rs/BearerTokenAuthorizationFilter.java +0 −3 Original line number Diff line number Diff line package com.inteligr8.rs; import java.io.UnsupportedEncodingException; import javax.ws.rs.client.ClientRequestContext; import javax.ws.rs.core.HttpHeaders; Loading Loading @@ -30,7 +28,6 @@ public class BearerTokenAuthorizationFilter implements AuthorizationFilter { * This method applies the 'Authorization' header to the {@link ClientRequestContext}. * * @param requestContext A request context. * @throws UnsupportedEncodingException The 'utf-8' encoding is not supported. */ @Override public void filter(ClientRequestContext requestContext) { Loading
src/main/java/com/inteligr8/rs/ClientCxfConfiguration.java +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ public interface ClientCxfConfiguration extends ClientConfiguration { * wreck havoc on your implementation. This method allows you to * explicitly by-pass the default bus. * * @see https://cxf.apache.org/docs/bus-configuration.html * See https://cxf.apache.org/docs/bus-configuration.html. * * @return true to use the default bus; false otherwise. */ Loading
src/main/java/com/inteligr8/rs/ClientJerseyImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ public abstract class ClientJerseyImpl extends Client implements InitializingBea this.register(); } /** * This method registers the Jersey library as the default provider for the * JAX-RS specification. */ public void register() { if (RuntimeDelegate.getInstance() == null) { this.logger.info("Setting JAX-RS runtime delegate to the Jersey library"); Loading
src/main/java/com/inteligr8/rs/OAuthAuthorizationFilter.java +30 −2 Original line number Diff line number Diff line Loading @@ -27,14 +27,42 @@ public abstract class OAuthAuthorizationFilter implements AuthorizationFilter { private long expiration; private String refreshToken; /** * This constructor creates an OAuth-based authorization filter using the * OAuth identity provider token URL and a client ID registered with the * same OAuth identity provider. * * @param tokenUrl An OAuth identity provider token URL. * @param clientId An OAuth identity provider client ID. */ public OAuthAuthorizationFilter(String tokenUrl, String clientId) { this(tokenUrl, clientId, null); } /** * This constructor creates an OAuth-based authorization filter using the * OAuth identity provider token URL, client ID registered with the * same OAuth identity provider, and the corresponding client secret. * * @param tokenUrl An OAuth identity provider token URL. * @param clientId An OAuth identity provider client ID. * @param clientSecret A secret corresponding to the client ID. */ public OAuthAuthorizationFilter(String tokenUrl, String clientId, String clientSecret) { this(tokenUrl, clientId, clientSecret, null); } /** * This constructor creates an OAuth-based authorization filter using the * OAuth identity provider token URL, client ID registered with the * same OAuth identity provider, the corresponding client secret, and OAuth * scope. * * @param tokenUrl An OAuth identity provider token URL. * @param clientId An OAuth identity provider client ID. * @param clientSecret A secret corresponding to the client ID. * @param scope An OAuth scope. */ public OAuthAuthorizationFilter(String tokenUrl, String clientId, String clientSecret, String scope) { this.tokenUrl = tokenUrl; this.clientId = clientId; Loading