Package com.google.walkaround.wave.server.auth.AccountStore

Examples of com.google.walkaround.wave.server.auth.AccountStore.Record


    // Google account for contact information and to import waves from; but it
    // is confusing, so we should disable it.)
    userContext.setOAuthCredentials(credentials);
    userContext.setOAuthProvider(oAuthProviders.get(split[0]));

    Record userInfo = userContext.getOAuthProvider().getUserInfo();
    userContext.setUserId(userInfo.getUserId());
    userContext.setParticipantId(userInfo.getParticipantId());
    log.info("User context: " + userContext);
    writeAccountRecordFromContext();
    authorizedCodes.put(split[1], userInfo.getUserId(), Expiration.byDeltaSeconds(30),
        SetPolicy.ADD_ONLY_IF_NOT_PRESENT);

    resp.setContentType("text/html");
    resp.setCharacterEncoding("UTF-8");
    Cookie uid = new Cookie(TokenBasedAccountLookup.USER_ID_KEY, userContext.getUserId().getId());
View Full Code Here


      secretToken = req.getParameter(SECRET_TOKEN_QUERY_PARAM_KEY);
    }
    if (userId == null || secretToken == null) {
      return false;
    }
    Record record;
    try {
      record = accountStore.get().get(new StableUserId(userId));
      if (record == null || record.getOAuthCredentials() == null
          || record.getOAuthCredentials().getAccessToken() == null) {
        return false;
      }
    } catch (PermanentFailure e) {
      throw new IOException("PermanentFailure getting account information", e);
    }
    userCtx.get().setUserId(new StableUserId(userId));
    try {
      xsrfHelper.get().verify(record.getOAuthCredentials().getAccessToken(), secretToken);
    } catch (XsrfTokenExpiredException e) {
      return false;
    } catch (InvalidSecurityTokenException e) {
      return false;
    }
View Full Code Here

TOP

Related Classes of com.google.walkaround.wave.server.auth.AccountStore.Record

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.