setOwner(null); setExpiresAt(null);
/** * Builds the data we'll cache on the client while we wait for approval. */ private void buildClientApprovalState() { OAuthAccessor accessor = accessorInfo.getAccessor(); responseParams.getNewClientState().setRequestToken(accessor.requestToken); responseParams.getNewClientState().setRequestTokenSecret(accessor.tokenSecret); responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); }
/** * Builds the data we'll cache on the client while we wait for approval. */ private void buildClientApprovalState() { OAuthAccessor accessor = accessorInfo.getAccessor(); responseParams.getNewClientState().setRequestToken(accessor.requestToken); responseParams.getNewClientState().setRequestTokenSecret(accessor.tokenSecret); responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); }
/** * Builds the data we'll cache on the client while we wait for approval. */ private void buildClientApprovalState() { OAuthAccessor accessor = accessorInfo.getAccessor(); responseParams.getNewClientState().setRequestToken(accessor.requestToken); responseParams.getNewClientState().setRequestTokenSecret(accessor.tokenSecret); responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); }
/** * Builds the data we'll cache on the client while we make requests. */ private void buildClientAccessState() { OAuthAccessor accessor = accessorInfo.getAccessor(); responseParams.getNewClientState().setAccessToken(accessor.accessToken); responseParams.getNewClientState().setAccessTokenSecret(accessor.tokenSecret); responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); responseParams.getNewClientState().setSessionHandle(accessorInfo.getSessionHandle()); responseParams.getNewClientState().setTokenExpireMillis(accessorInfo.getTokenExpireMillis()); }
/** * Builds the data we'll cache on the client while we make requests. */ private void buildClientAccessState() { OAuthAccessor accessor = accessorInfo.getAccessor(); responseParams.getNewClientState().setAccessToken(accessor.accessToken); responseParams.getNewClientState().setAccessTokenSecret(accessor.tokenSecret); responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); responseParams.getNewClientState().setSessionHandle(accessorInfo.getSessionHandle()); responseParams.getNewClientState().setTokenExpireMillis(accessorInfo.getTokenExpireMillis()); }
/** * Builds the data we'll cache on the client while we make requests. */ private void buildClientAccessState() { OAuthAccessor accessor = accessorInfo.getAccessor(); responseParams.getNewClientState().setAccessToken(accessor.accessToken); responseParams.getNewClientState().setAccessTokenSecret(accessor.tokenSecret); responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); responseParams.getNewClientState().setSessionHandle(accessorInfo.getSessionHandle()); responseParams.getNewClientState().setTokenExpireMillis(accessorInfo.getTokenExpireMillis()); }
@Test public void testNullValue() throws Exception { OAuthClientState state = new OAuthClientState(crypter); state.setRequestToken("reqtoken"); state.setRequestToken(null); state.setOwner("owner"); String encrypted = state.getEncryptedState(); state = new OAuthClientState(crypter, encrypted); assertNull(state.getRequestToken()); assertEquals("owner", state.getOwner()); } }
@Test public void testNullValue() throws Exception { OAuthClientState state = new OAuthClientState(crypter); state.setRequestToken("reqtoken"); state.setRequestToken(null); state.setOwner("owner"); String encrypted = state.getEncryptedState(); state = new OAuthClientState(crypter, encrypted); assertNull(state.getRequestToken()); assertEquals("owner", state.getOwner()); } }
@Test public void testNullValue() throws Exception { OAuthClientState state = new OAuthClientState(crypter); state.setRequestToken("reqtoken"); state.setRequestToken(null); state.setOwner("owner"); String encrypted = state.getEncryptedState(); state = new OAuthClientState(crypter, encrypted); assertNull(state.getRequestToken()); assertEquals("owner", state.getOwner()); } }
@Test public void testValuesSet() throws Exception { OAuthClientState state = new OAuthClientState(crypter); state.setAccessToken("atoken"); state.setAccessTokenSecret("atokensecret"); state.setOwner("owner"); state.setRequestToken("reqtoken"); state.setRequestTokenSecret("reqtokensecret"); String encrypted = state.getEncryptedState(); state = new OAuthClientState(crypter, encrypted); assertEquals("atoken", state.getAccessToken()); assertEquals("atokensecret", state.getAccessTokenSecret()); assertEquals("owner", state.getOwner()); assertEquals("reqtoken", state.getRequestToken()); assertEquals("reqtokensecret", state.getRequestTokenSecret()); }
@Test public void testValuesSet() throws Exception { OAuthClientState state = new OAuthClientState(crypter); state.setAccessToken("atoken"); state.setAccessTokenSecret("atokensecret"); state.setOwner("owner"); state.setRequestToken("reqtoken"); state.setRequestTokenSecret("reqtokensecret"); String encrypted = state.getEncryptedState(); state = new OAuthClientState(crypter, encrypted); assertEquals("atoken", state.getAccessToken()); assertEquals("atokensecret", state.getAccessTokenSecret()); assertEquals("owner", state.getOwner()); assertEquals("reqtoken", state.getRequestToken()); assertEquals("reqtokensecret", state.getRequestTokenSecret()); }
@Test public void testValuesSet() throws Exception { OAuthClientState state = new OAuthClientState(crypter); state.setAccessToken("atoken"); state.setAccessTokenSecret("atokensecret"); state.setOwner("owner"); state.setRequestToken("reqtoken"); state.setRequestTokenSecret("reqtokensecret"); String encrypted = state.getEncryptedState(); state = new OAuthClientState(crypter, encrypted); assertEquals("atoken", state.getAccessToken()); assertEquals("atokensecret", state.getAccessTokenSecret()); assertEquals("owner", state.getOwner()); assertEquals("reqtoken", state.getRequestToken()); assertEquals("reqtokensecret", state.getRequestTokenSecret()); }