Ejemplo n.º 1
0
 @Override
 public void addAccessToken(String accessToken, String account, String clientId) {
   OAuthObject authObject = new OAuthObject();
   authObject.setAccount(accessToken);
   authObject.setAccount(account);
   authObject.setClientId(clientId);
   this.cache.put(accessToken, account);
 }
Ejemplo n.º 2
0
 @Override
 public void addAuthCode(String authCode, String account, String clientId) {
   OAuthObject authObject = new OAuthObject();
   authObject.setAccessCode(authCode);
   authObject.setAccount(account);
   authObject.setClientId(clientId);
   this.cache.put(authCode, authObject);
 }
Ejemplo n.º 3
0
 @Override
 public String getAccountByAccessToken(String accessToken) {
   OAuthObject authObject = (OAuthObject) cache.get(accessToken).get();
   return authObject == null ? null : authObject.getAccount();
 }
Ejemplo n.º 4
0
 @Override
 public String getAccountByAuthCode(String authCode) {
   OAuthObject authObject = (OAuthObject) cache.get(authCode).get();
   return authObject == null ? null : authObject.getAccount();
 }