/** * Builds client instance which will be passing the provided value in the * {@link javax.ws.rs.core.HttpHeaders#AUTHORIZATION} * request header. * * @param jwt value received after login, in the {@link RESTHeaders#TOKEN} response header * @return client instance which will be passing the provided value in the * {@link javax.ws.rs.core.HttpHeaders#AUTHORIZATION} * request header */ public SyncopeClient create(final String jwt) { return create(new JWTAuthenticationHandler(jwt)); }
restClientFactory.getHeaders().put( HttpHeaders.AUTHORIZATION, Collections.singletonList("Bearer " + ((JWTAuthenticationHandler) handler).getJwt()));
restClientFactory.getHeaders().put( HttpHeaders.AUTHORIZATION, Collections.singletonList("Bearer " + ((JWTAuthenticationHandler) handler).getJwt()));
/** * Builds client instance which will be passing the provided value in the * {@link javax.ws.rs.core.HttpHeaders#AUTHORIZATION} * request header. * * @param jwt value received after login, in the {@link RESTHeaders#TOKEN} response header * @return client instance which will be passing the provided value in the * {@link javax.ws.rs.core.HttpHeaders#AUTHORIZATION} * request header */ public SyncopeClient create(final String jwt) { return create(new JWTAuthenticationHandler(jwt)); }