@Test @SuppressWarnings("deprecation") public void testService_Legacy_WithExpiry() throws Exception { long now = System.currentTimeMillis(); String expiryDate = DateFormatUtil.format(new Date(now)); AccessToken t = new AccessToken(getName(), now); GetOauthToken service = new GetOauthToken().withTokenExpiryKey("expiry"); service.setAccessTokenBuilder(new DummyAccessTokenBuilder(t)); AdaptrisMessage msg = new DefaultMessageFactory().newMessage(TEXT); try { execute(service, msg); } finally { } assertTrue(msg.headersContainsKey("Authorization")); assertEquals("Bearer " + getName(), msg.getMetadataValue("Authorization")); assertTrue(msg.headersContainsKey("expiry")); assertEquals(expiryDate, msg.getMetadataValue("expiry")); }
@Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") public GetOauthToken withTokenExpiryKey(String b) { setTokenExpiryKey(b); return this; }
GetOauthToken extends OauthTokenGetter { @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") public GetOauthToken withTokenExpiryKey(String b) { setTokenExpiryKey(b); return this; } }
GetOauthToken extends OauthTokenGetter { @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") public GetOauthToken withTokenExpiryKey(String b) { setTokenExpiryKey(b); return this; } GetOauthToken(); }
GetOauthToken extends OauthTokenGetter { @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") public GetOauthToken withTokenExpiryKey(String b) { setTokenExpiryKey(b); return this; } GetOauthToken(); @Override void doService(AdaptrisMessage msg); GetOauthToken withTokenKey(String b); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") String getTokenKey(); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") void setTokenKey(String key); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") GetOauthToken withTokenExpiryKey(String b); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") String getTokenExpiryKey(); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") void setTokenExpiryKey(String key); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-write instead") GetOauthToken withRefreshTokenKey(String refreshMetadataKey); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-write instead") String getRefreshTokenKey(); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-write instead") void setRefreshTokenKey(String key); }
GetOauthToken extends OauthTokenGetter { @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") public GetOauthToken withTokenExpiryKey(String b) { setTokenExpiryKey(b); return this; } GetOauthToken(); @Override void doService(AdaptrisMessage msg); GetOauthToken withTokenKey(String b); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") String getTokenKey(); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") void setTokenKey(String key); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") GetOauthToken withTokenExpiryKey(String b); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") String getTokenExpiryKey(); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-writer instead") void setTokenExpiryKey(String key); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-write instead") GetOauthToken withRefreshTokenKey(String refreshMetadataKey); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-write instead") String getRefreshTokenKey(); @Deprecated @Removal(version = "3.12.0", message = "Use a access-token-write instead") void setRefreshTokenKey(String key);  }