Package com.opengamma.core.user.impl

Examples of com.opengamma.core.user.impl.SimpleOGUser


  public void test_roundTripPasswordHash() {
    String simple = "P455w0rD";
    String hash = AuthenticationUtils.generatePasswordHash(simple);
    assertNotNull(hash);
    assertFalse(hash.isEmpty());
    SimpleOGUser oguser = new SimpleOGUser("testuser");
    oguser.setPasswordHash(hash);
   
    assertTrue(AuthenticationUtils.passwordsMatch(oguser, simple));
    assertFalse(AuthenticationUtils.passwordsMatch(oguser, "Pa55w0rD"));
  }
View Full Code Here


  }
 
  protected OGUser getOGUser(String userId) {
    if (getUserSource() == null) {
      // Nothing will work without an OG User. So we return a mock one.
      SimpleOGUser simpleUser = new SimpleOGUser(userId);
      simpleUser.getEntitlements().add("*");
      return simpleUser;
    }
    try {
      return getUserSource().getUser(userId, VersionCorrection.LATEST);
     
View Full Code Here

TOP

Related Classes of com.opengamma.core.user.impl.SimpleOGUser

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.