-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.8.11' of github.com:atricore/josso1 into 1.8.12
- Loading branch information
Showing
27 changed files
with
2,645 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,18 +27,21 @@ | |
/** | ||
* Acts as a Catalina Session wrapper. | ||
* | ||
* @author <a href="mailto:[email protected]">Gianluca Brigandi</a> | ||
* @author <a href="mailto:[email protected]">Gianluca Brigandi</a> | ||
* @version CVS $Id: CatalinaLocalSession.java 974 2009-01-14 00:39:45Z sgonzalez $ | ||
*/ | ||
public class CatalinaLocalSession extends LocalSessionImpl { | ||
|
||
public CatalinaLocalSession( Session catalinaSession) { | ||
public CatalinaLocalSession(Session catalinaSession) { | ||
super(); | ||
|
||
setWrapped(catalinaSession); | ||
setMaxInactiveInterval(catalinaSession.getMaxInactiveInterval()); | ||
|
||
setWrapped(catalinaSession); | ||
setMaxInactiveInterval(catalinaSession.getMaxInactiveInterval()); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "CatalinaLocalSession [toString()=" + super.toString() + "]"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,22 +25,25 @@ | |
import org.apache.catalina.Container; | ||
import org.apache.catalina.Context; | ||
import org.apache.catalina.Realm; | ||
import org.apache.commons.logging.Log; | ||
import org.apache.commons.logging.LogFactory; | ||
import org.josso.agent.SSOAgentRequest; | ||
import org.josso.agent.http.HttpSSOAgent; | ||
|
||
import java.security.Principal; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Gianluca Brigandi</a> | ||
* @version CVS $Id: CatalinaSSOAgent.java 974 2009-01-14 00:39:45Z sgonzalez $ | ||
* @org.apache.xbean.XBean element="agent" | ||
* | ||
* <p> | ||
* Catalina SSO Agent Implementation that authenticates using the configured Catalina Realm's | ||
* Gateway SSO Login module. | ||
* | ||
* @author <a href="mailto:[email protected]">Gianluca Brigandi</a> | ||
* @version CVS $Id: CatalinaSSOAgent.java 974 2009-01-14 00:39:45Z sgonzalez $ | ||
*/ | ||
public class CatalinaSSOAgent extends HttpSSOAgent { | ||
|
||
private static final Log LOG = LogFactory.getLog(CatalinaSSOAgent.class); | ||
|
||
private Container _container; | ||
|
||
public CatalinaSSOAgent() { | ||
|
@@ -50,7 +53,7 @@ public CatalinaSSOAgent() { | |
|
||
public CatalinaSSOAgent(Container container) { | ||
super(); | ||
_container = container; | ||
_container = container; | ||
|
||
} | ||
|
||
|
@@ -95,25 +98,19 @@ protected Principal authenticate(SSOAgentRequest request) { | |
Principal p = realm.authenticate(r.getSessionId(), r.getSessionId()); | ||
|
||
if (debug > 0) | ||
log("Received principal : " + p + "[" + ( p != null ? p.getClass().getName() : "<null>" ) +"]"); | ||
log("Received principal : " + p + "[" + (p != null ? p.getClass().getName() : "<null>") + "]"); | ||
|
||
return p; | ||
} | ||
|
||
protected void log(String message) { | ||
if (_container != null) { | ||
if (_container.getLogger().isDebugEnabled()) | ||
_container.getLogger().debug(this.toString() + ": " + message); | ||
} else | ||
System.out.println(this.toString() + ": " + message); | ||
if (LOG.isDebugEnabled()) | ||
LOG.debug(message); | ||
} | ||
|
||
protected void log(String message, Throwable throwable) { | ||
if (_container != null) { | ||
if (_container.getLogger().isDebugEnabled()) | ||
_container.getLogger().debug(this.toString() + ": " + message, throwable); | ||
} else | ||
System.out.println(this.toString() + ": " + message); | ||
if (LOG.isDebugEnabled()) | ||
LOG.debug(message, throwable); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.