Tabnine Logo
Cookie.setMaxAge
Code IndexAdd Tabnine to your IDE (free)

How to use
setMaxAge
method
in
org.pac4j.core.context.Cookie

Best Java code snippets using org.pac4j.core.context.Cookie.setMaxAge (Showing top 6 results out of 315)

origin: pippo-java/pippo

@Override
public Collection<Cookie> getRequestCookies() {
  return getRequest().getCookies().stream().map(c -> {
    Cookie cookie = new Cookie(c.getName(), c.getValue());
    cookie.setComment(c.getComment());
    cookie.setSecure(c.getSecure());
    cookie.setPath(c.getPath());
    cookie.setHttpOnly(c.isHttpOnly());
    cookie.setDomain(c.getDomain());
    cookie.setMaxAge(c.getMaxAge());
    cookie.setVersion(c.getVersion());
    return cookie;
  }).collect(Collectors.toList());
}
origin: pac4j/undertow-pac4j

@Override
public Collection<Cookie> getRequestCookies() {
  final Collection<io.undertow.server.handlers.Cookie> uCookies = exchange.getRequestCookies().values();
  final List<Cookie> cookies = new ArrayList<>(uCookies.size());
  for (final io.undertow.server.handlers.Cookie uCookie : uCookies) {
    final Cookie cookie = new Cookie(uCookie.getName(), uCookie.getValue());
    cookie.setComment(uCookie.getComment());
    cookie.setDomain(uCookie.getDomain());
    cookie.setPath(uCookie.getPath());
    cookie.setMaxAge(uCookie.getMaxAge() == null ? -1 : uCookie.getMaxAge());
    cookie.setSecure(uCookie.isSecure());
    cookie.setHttpOnly(uCookie.isHttpOnly());
    cookies.add(cookie);
  }
  return cookies;
}
origin: io.ratpack/ratpack-pac4j

@Override
public Collection<Cookie> getRequestCookies() {
 final List<Cookie> newCookies = new ArrayList<>();
 final Set<io.netty.handler.codec.http.cookie.Cookie> cookies = request.getCookies();
 for (final io.netty.handler.codec.http.cookie.Cookie cookie : cookies) {
  final Cookie newCookie = new Cookie(cookie.name(), cookie.value());
  newCookie.setDomain(cookie.domain());
  newCookie.setPath(cookie.path());
  newCookie.setMaxAge((int) cookie.maxAge());
  newCookie.setSecure(cookie.isSecure());
  newCookie.setHttpOnly(cookie.isHttpOnly());
  newCookies.add(newCookie);
 }
 return newCookies;
}
origin: org.pac4j/play-pac4j-java

@Override
public Collection<Cookie> getRequestCookies() {
  final List<Cookie> cookies = new ArrayList<>();
  final Http.Cookies httpCookies = request.cookies();
  httpCookies.forEach(httpCookie -> {
    final Cookie cookie = new Cookie(httpCookie.name(), httpCookie.value());
    cookie.setDomain(httpCookie.domain());
    cookie.setHttpOnly(httpCookie.httpOnly());
    cookie.setMaxAge(httpCookie.maxAge());
    cookie.setPath(httpCookie.path());
    cookie.setSecure(httpCookie.secure());
    cookies.add(cookie);
  });
  return cookies;
}
origin: pac4j/play-pac4j

@Override
public Collection<Cookie> getRequestCookies() {
  final List<Cookie> cookies = new ArrayList<>();
  final Http.Cookies httpCookies = request.cookies();
  httpCookies.forEach(httpCookie -> {
    final Cookie cookie = new Cookie(httpCookie.name(), httpCookie.value());
    if(httpCookie.domain() != null) {
      cookie.setDomain(httpCookie.domain());
    }
    cookie.setHttpOnly(httpCookie.httpOnly());
    if(httpCookie.maxAge() != null) {
      cookie.setMaxAge(httpCookie.maxAge());
    }
    cookie.setPath(httpCookie.path());
    cookie.setSecure(httpCookie.secure());
    cookies.add(cookie);
  });
  return cookies;
}
origin: pac4j/play-pac4j

@Override
public Collection<Cookie> getRequestCookies() {
  final List<Cookie> cookies = new ArrayList<>();
  final Http.Cookies httpCookies = request.cookies();
  httpCookies.forEach(httpCookie -> {
    final Cookie cookie = new Cookie(httpCookie.name(), httpCookie.value());
    if(httpCookie.domain() != null) {
      cookie.setDomain(httpCookie.domain());
    }
    cookie.setHttpOnly(httpCookie.httpOnly());
    if(httpCookie.maxAge() != null) {
      cookie.setMaxAge(httpCookie.maxAge());
    }
    cookie.setPath(httpCookie.path());
    cookie.setSecure(httpCookie.secure());
    cookies.add(cookie);
  });
  return cookies;
}
org.pac4j.core.contextCookiesetMaxAge

Popular methods of Cookie

  • <init>
  • getValue
  • getName
  • setDomain
  • setHttpOnly
  • setSecure
  • getDomain
  • getMaxAge
  • getPath
  • isHttpOnly
  • isSecure
  • setPath
  • isSecure,
  • setPath,
  • getComment,
  • setComment,
  • setVersion,
  • getVersion

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • Kernel (java.awt.image)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Path (java.nio.file)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now