Package models

Examples of models.TokenAction


      return badRequest(password_reset.render(filledForm));
    } else {
      final String token = filledForm.get().token;
      final String newPassword = filledForm.get().password;

      final TokenAction ta = tokenIsValid(token, Type.PASSWORD_RESET);
      if (ta == null) {
        return badRequest(no_token_or_invalid.render());
      }
      final User u = ta.targetUser;
      try {
View Full Code Here


    return ok(exists.render());
  }

  public static Result verify(final String token) {
    com.feth.play.module.pa.controllers.Authenticate.noCache(response());
    final TokenAction ta = tokenIsValid(token, Type.EMAIL_VERIFICATION);
    if (ta == null) {
      return badRequest(no_token_or_invalid.render());
    }
    final String email = ta.targetUser.email;
    User.verify(ta.targetUser);
View Full Code Here

   * @param token
   * @param type
   * @return
   */
  private static TokenAction tokenIsValid(final String token, final Type type) {
    TokenAction ret = null;
    if (token != null && !token.trim().isEmpty()) {
      final TokenAction ta = TokenAction.findByToken(token, type);
      if (ta != null && ta.isValid()) {
        ret = ta;
      }
    }

    return ret;
View Full Code Here

    return ret;
  }

  public static Result resetPassword(final String token) {
    com.feth.play.module.pa.controllers.Authenticate.noCache(response());
    final TokenAction ta = tokenIsValid(token, Type.PASSWORD_RESET);
    if (ta == null) {
      return badRequest(no_token_or_invalid.render());
    }

    return ok(password_reset.render(PASSWORD_RESET_FORM
View Full Code Here

TOP

Related Classes of models.TokenAction

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.