@Test public void testCreateBearerToken_formatsCorrectly() throws Exception { when(accessToken.getToken()).thenReturn("token1234"); assertEquals("Bearer token1234", authenticator.createBearerToken(accessToken)); }
String createBearerToken(AccessToken oAuth2Token) { return String.format(HEADER_BEARER_ACCESS_VALUE, oAuth2Token.getToken()); }
AccessTokenAuthenticator extends
        BaseRefreshableAuthenticator implements Authenticator { String createBearerToken(AccessToken oAuth2Token) { return String.format(HEADER_BEARER_ACCESS_VALUE, oAuth2Token.getToken()); } }
AccessTokenAuthenticator extends
        BaseRefreshableAuthenticator implements Authenticator { String createBearerToken(AccessToken oAuth2Token) { return String.format(HEADER_BEARER_ACCESS_VALUE, oAuth2Token.getToken()); } AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
                                    AccessTokenStorage tokenStorage);   AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
                             AccessTokenStorage tokenStorage,
                             OAuth2Service auth2Service); }
AccessTokenAuthenticator extends
        BaseRefreshableAuthenticator implements Authenticator { String createBearerToken(AccessToken oAuth2Token) { return String.format(HEADER_BEARER_ACCESS_VALUE, oAuth2Token.getToken()); } 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 { String createBearerToken(AccessToken oAuth2Token) { return String.format(HEADER_BEARER_ACCESS_VALUE, oAuth2Token.getToken()); } 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();  }