@Test public void testSetBearerToken_formatsCorrectly() throws Exception { Request.Builder builder = dummyRequest.newBuilder(); when(accessToken.getToken()).thenReturn("token1234"); authenticator.setBearerToken(builder, accessToken); assertEquals("Bearer token1234", builder.build().header("Authorization")); }
void setBearerToken(Request.Builder builder, AccessToken OAuth2Token) { ApiInterceptor.setAuthorizationHeader(builder, createBearerToken(OAuth2Token)); }
AccessTokenAuthenticator extends
        BaseRefreshableAuthenticator implements Authenticator { void setBearerToken(Request.Builder builder, AccessToken OAuth2Token) { ApiInterceptor.setAuthorizationHeader(builder, createBearerToken(OAuth2Token)); } }
AccessTokenAuthenticator extends
        BaseRefreshableAuthenticator implements Authenticator { void setBearerToken(Request.Builder builder, AccessToken OAuth2Token) { ApiInterceptor.setAuthorizationHeader(builder, createBearerToken(OAuth2Token)); } AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
                                    AccessTokenStorage tokenStorage);   AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
                             AccessTokenStorage tokenStorage,
                             OAuth2Service auth2Service); }
AccessTokenAuthenticator extends
        BaseRefreshableAuthenticator implements Authenticator { void setBearerToken(Request.Builder builder, AccessToken OAuth2Token) { ApiInterceptor.setAuthorizationHeader(builder, createBearerToken(OAuth2Token)); } AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
                                    AccessTokenStorage tokenStorage);   AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
                             AccessTokenStorage tokenStorage,
                             OAuth2Service auth2Service); @Override void signRequest(Request.Builder builder); @Override boolean isRefreshable(); @Override SessionConfiguration getSessionConfiguration(); AccessTokenStorage getTokenStorage(); }
AccessTokenAuthenticator extends
        BaseRefreshableAuthenticator implements Authenticator { void setBearerToken(Request.Builder builder, AccessToken OAuth2Token) { ApiInterceptor.setAuthorizationHeader(builder, createBearerToken(OAuth2Token)); } AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
                                    AccessTokenStorage tokenStorage);   AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
                             AccessTokenStorage tokenStorage,
                             OAuth2Service auth2Service); @Override void signRequest(Request.Builder builder); @Override boolean isRefreshable(); @Override SessionConfiguration getSessionConfiguration(); AccessTokenStorage getTokenStorage();  }