Examples of TokenInfo


Examples of org.platformlayer.auth.services.TokenInfo

    } catch (AuthenticatorException e) {
      log.warn("Error while checking system token", e);
      throwInternalError();
    }

    TokenInfo checkTokenInfo = tokenService.decodeToken(checkToken);
    if (checkTokenInfo == null || checkTokenInfo.hasExpired()) {
      throw404NotFound();
    }

    UserEntity userEntity = null;
    try {
View Full Code Here

Examples of org.platformlayer.auth.services.TokenInfo

      }

      long roundedTime = Long.parseLong(expiration, 16);
      long time = (roundedTime * TIME_GRANULARITY) + TIME_OFFSET;

      return new TokenInfo(flags, username, new Date(time), tokenSecret);
    } catch (Exception e) {
      return null;
    }
  }
View Full Code Here

Examples of pl.net.bluesoft.rnd.processtool.plugins.TokenInfo

                MessageDigest md = MessageDigest.getInstance("SHA-1");
                token = toHex(md.digest(token.getBytes()));
                req.getSession().setAttribute(LAST_TOKEN, token);
                resp.sendRedirect(req.getParameter("returl") + token);
                tokenMap.put(token,
                        new TokenInfo(token,
                                (String)req.getSession().getAttribute(PermissionFilter.AUTHORIZED),
                        new Date(),
                        1));
            } catch (NoSuchAlgorithmException e) {
                throw new ServletException(e);
            }
        } else if (req.getParameter("token") != null && req.getParameter("returl") == null) {
            resp.setContentType("text/plain");
            TokenInfo ti = tokenMap.get(req.getParameter("token"));
            if (ti != null && ti.getUserLogin() != null) {
                resp.getWriter().print(ti.getUserLogin());
            } else {
                resp.setStatus(401);
                resp.getWriter().print("Invalid token");
            }
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.