All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.beangle.security.web.session.DefaultSessionIdPolicy.scala Maven / Gradle / Ivy

package org.beangle.security.web.session

import javax.servlet.http.HttpServletRequest
import org.beangle.security.session.SessionId

class DefaultSessionIdPolicy extends SessionIdPolicy {

  var sessionIdParam: String = _

  def getSessionId(req: HttpServletRequest): SessionId = {
    var sid: String = null
    if (null != sessionIdParam) {
      sid = req.getParameter(sessionIdParam)
    } else {
      val hs = req.getSession(true)
      sid = hs.getId
    }
    if (null != sid) SessionId(sid) else null
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy