Package ca.carleton.gcrc.couch.client

Examples of ca.carleton.gcrc.couch.client.CouchAuthenticationContext


   
    return result;
  }

  public Collection<JSONObject> getUserDocuments(List<String> userIds, Cookie[] cookies) throws Exception {
    CouchAuthenticationContext context = userRepository.getRolesFromAuthentication(cookies);
    List<String> roles = context.getRoles();
   
    String atlasAdmin = atlasName + "_administrator";
    String atlasVetter = atlasName + "_vetter";
   
    boolean allowed = false;
View Full Code Here


    if( agreementEnabled
     && false == agreementContents.contains(userAgreement) ){
      throw new Exception("Provided agreement does not match the one found in the atlas.");
    }

    CouchAuthenticationContext context = userRepository.getRolesFromAuthentication(cookies);
   
    JSONObject userDoc = userRepository.getUserFromName(context.getName());
   
    // Update user document with agreement
    JSONObject nunaliit_accepted_user_agreements = userDoc.optJSONObject("nunaliit_accepted_user_agreements");
    if( null == nunaliit_accepted_user_agreements ){
      nunaliit_accepted_user_agreements = new JSONObject();
View Full Code Here

   
    CouchFactory factory = new CouchFactory();
    CouchDb couchDb = factory.getDb(contextCookie, userDb);

    CouchSession session = couchDb.getClient().getSession();
    CouchAuthenticationContext userContext = session.getAuthenticationContext();
   
    return userContext;
  }
View Full Code Here

TOP

Related Classes of ca.carleton.gcrc.couch.client.CouchAuthenticationContext

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.