Package play.mvc.Http

Examples of play.mvc.Http.Session


      } else if (o instanceof Result) {
        return (Result) o;
      } else if (o instanceof AuthUser) {

        final AuthUser newUser = (AuthUser) o;
        final Session session = context.session();

        // We might want to do merging here:
        // Adapted from:
        // http://stackoverflow.com/questions/6666267/architecture-for-merging-multiple-user-accounts-together
        // 1. The account is linked to a local account and no session
View Full Code Here


  /**
   * The validation itself
   */
  @Override
  public boolean isValid(Object uuid) {
    Session session = play.mvc.Http.Context.current().session();
    String atoken = session.get(AuthTokenConstants.AUTH_TOKEN);
    session.remove(AuthTokenConstants.AUTH_TOKEN);
   
    if (atoken == null || uuid == null)
      return false;

    String sign = Crypto.sign(uuid.toString());
View Full Code Here

    this.formType = clazz;
  }

  private void checkAuthenticity(Map<String, String> data) {
    AuthenticityCheck anno = this.formType.getAnnotation(AuthenticityCheck.class);
    Session session = play.mvc.Http.Context.current().session();
    String atoken = session.get(AuthenticityCheck.AUTH_TOKEN);
    session.remove(AuthenticityCheck.AUTH_TOKEN);
    String uuid = data.get(AuthenticityCheck.AUTH_TOKEN);

    if (anno != null) {
      if (StringUtils.isEmpty(uuid) || StringUtils.isEmpty(atoken)) {
        alarm();
View Full Code Here

TOP

Related Classes of play.mvc.Http.Session

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.