Tabnine Logo
SessionFactory.createSession
Code IndexAdd Tabnine to your IDE (free)

How to use
createSession
method
in
org.apache.shiro.session.mgt.SessionFactory

Best Java code snippets using org.apache.shiro.session.mgt.SessionFactory.createSession (Showing top 5 results out of 315)

origin: apache/shiro

protected Session newSessionInstance(SessionContext context) {
  return getSessionFactory().createSession(context);
}
origin: org.apache.shiro/shiro-core

protected Session newSessionInstance(SessionContext context) {
  return getSessionFactory().createSession(context);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.shiro

protected Session newSessionInstance(SessionContext context) {
  return getSessionFactory().createSession(context);
}
origin: uk.q3c.krail/krail

@Override
public Session start(SessionContext context) {
  log.debug("starting VaadinSessionManager");
  // Retrieve the VaadinSession for the current user.
  VaadinSession vaadinSession = sessionProvider.get();
  // Create a new security session using the session factory.
  SimpleSession shiroSession = (SimpleSession) sessionFactory.createSession(context);
  // Assign a unique ID to the session now because this session manager
  // doesn't use a SessionDAO for persistence as it delegates to any
  // VaadinSession configured persistence.
  shiroSession.setId(UUID.randomUUID()
              .toString());
  // Put the security session in the VaadinSession. We use the session's ID as
  // part of the key just to be safe so we can double check that the security
  // session matches when it is requested in getSession.
  vaadinSession.setAttribute(SESSION_ATTRIBUTE_PREFIX + shiroSession.getId(), shiroSession);
  return shiroSession;
}
origin: KrailOrg/krail

@Override
public Session start(SessionContext context) {
  log.debug("starting VaadinSessionManager");
  // Retrieve the VaadinSession for the current user.
  VaadinSession vaadinSession = sessionProvider.get();
  // Create a new security session using the session factory.
  SimpleSession shiroSession = (SimpleSession) sessionFactory.createSession(context);
  // Assign a unique ID to the session now because this session manager
  // doesn't use a SessionDAO for persistence as it delegates to any
  // VaadinSession configured persistence.
  shiroSession.setId(UUID.randomUUID()
              .toString());
  // Put the security session in the VaadinSession. We use the session's ID as
  // part of the key just to be safe so we can double check that the security
  // session matches when it is requested in getSession.
  vaadinSession.setAttribute(SESSION_ATTRIBUTE_PREFIX + shiroSession.getId(), shiroSession);
  return shiroSession;
}
org.apache.shiro.session.mgtSessionFactorycreateSession

Javadoc

Creates a new Session instance based on the specified contextual initialization data.

Popular methods of SessionFactory

    Popular in Java

    • Reactive rest calls using spring rest template
    • setContentView (Activity)
    • onCreateOptionsMenu (Activity)
    • findViewById (Activity)
    • Graphics2D (java.awt)
      This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
    • BufferedWriter (java.io)
      Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
    • URLConnection (java.net)
      A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
    • Enumeration (java.util)
      A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
    • SortedMap (java.util)
      A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
    • Collectors (java.util.stream)
    • Top Vim 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