OAUTH2 Problem in JBOSS

Posted on

Hi.

In this moment i'm trying Oauth2 with Jboss but with not sucess.
I have been able to test the authorize service and make debug with some pieces of code (I have to import java packages) but in this moment i'm getting an error telling me

  • java.lang.IllegalStateException: No SessionManager.

I have seen a message in the code
" //check if session management is set up, if not set up HashSessions"
in the class org.eclipse.jetty.server.session. so i supoose that i have to enable something to enable the session management. besides the SessionHandler Class is not been invoked at any moment so the method of this class
"setSessionHandler" is never invoked and thats the reason of the "No session manager" error.

//jetty.server.session.SessionHandler.java
public void setSessionHandler(SessionHandler sessionHandler)
{
//Never Called
_sessionHandler = sessionHandler;
}

jetty.server.Request.java
public HttpSession getSession(boolean create)
{
if (_session != null)
{
if (_sessionHandler != null && !_sessionHandler.isValid(_session))
_session = null;
else
return _session;
}

    if (!create)
        return null;

    if (getResponse().isCommitted())
        throw new IllegalStateException("Response is committed");

    if (_sessionHandler == null)
        throw new IllegalStateException("No SessionManager");

    _session = _sessionHandler.newHttpSession(this);
    HttpCookie cookie = _sessionHandler.getSessionCookie(_session,getContextPath(),isSecure());
    if (cookie != null)
        _channel.getResponse().addCookie(cookie);

    return _session;
}

Is there any additional configuration to make it work?

any help i appreciate it.

Best regards.
Oscar.

Responses