Package edu.wpi.cs.wpisuitetng.authentication

Examples of edu.wpi.cs.wpisuitetng.authentication.Sha256Password


    this.man = ManagerLayer.getInstance();
    this.sessions = man.getSessions();
   
    // add the test user to the database
    DataStore db = DataStore.getDataStore();
    String hashedPassword = new Sha256Password().generateHash("jayms");
    this.u = new User("Tyler", "twack", hashedPassword, 5);
    db.save(this.u);
  }
View Full Code Here


  @Test
  public void testLoginSuccess() throws WPISuiteException
  {
    int test = this.sessions.sessionCount();
    // generate a login token (password hardcoded)
    String hashedPassword = new Sha256Password().generateHash("jayms");
    String token = BasicAuth.generateBasicAuth(this.u.getUsername(), "jayms");
   
    Session ses = this.auth.login(token); // login
   
    // check if session created for the user
View Full Code Here

   * @param data
   */
  public UserManager(Data data)
  {
    this.data = data;
    this.passwordHash = new Sha256Password();

    // build the custom serializer/deserializer
    GsonBuilder builder = new GsonBuilder();
    builder.registerTypeAdapter(this.user, new UserDeserializer());

View Full Code Here

TOP

Related Classes of edu.wpi.cs.wpisuitetng.authentication.Sha256Password

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.