net.geant.edugain.base.websso
Class WebSSOResponder

java.lang.Object
  extended by net.geant.edugain.base.websso.WebSSOResponder

public class WebSSOResponder
extends java.lang.Object

Class to be used by a 'responder' (home) bridging element to handle HTTP requests coming from a local federation that need to be translated into eduGAIN response messages. This class makes use of previously saved states about the original request that originated this response in order to create the appropriate response.

Author:
Jose Manuel Macias, Jaime Perez Crespo

Field Summary
(package private)  java.util.Locale _locale
           
private  Configurator cfg
           
private  org.apache.log4j.Logger log
           
private  java.lang.String template
           
 
Constructor Summary
WebSSOResponder()
          Default constructor not receiving any parameter.
WebSSOResponder(java.util.Properties props)
          Constructor receiving signing properties as a parameter.
 
Method Summary
 java.util.Locale getLocale()
          Gets the current locale to use for the current response.
private  void loadTemplate(java.lang.String file)
           
 void sendAuthenticationResponse(AuthenticationResponse response, javax.servlet.http.HttpServletResponse httpResponse, java.net.URI location, java.net.URI target)
          Process an AuthenticationRequest request and builds the appropriate HTTP response (redirection to a RemoteBE).
 void setLocale(java.util.Locale locale)
          Sets the current locale to use for the current response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cfg

private Configurator cfg

template

private java.lang.String template

log

private org.apache.log4j.Logger log

_locale

java.util.Locale _locale
Constructor Detail

WebSSOResponder

public WebSSOResponder()
Default constructor not receiving any parameter. The internal signingProperties initialized using the values from the eduGAIN configuration in use.


WebSSOResponder

public WebSSOResponder(java.util.Properties props)
Constructor receiving signing properties as a parameter.

Method Detail

loadTemplate

private void loadTemplate(java.lang.String file)

setLocale

public void setLocale(java.util.Locale locale)
Sets the current locale to use for the current response.

Parameters:
locale - The locale to use for this response.

getLocale

public java.util.Locale getLocale()
Gets the current locale to use for the current response.


sendAuthenticationResponse

public void sendAuthenticationResponse(AuthenticationResponse response,
                                       javax.servlet.http.HttpServletResponse httpResponse,
                                       java.net.URI location,
                                       java.net.URI target)
                                throws BaseException
Process an AuthenticationRequest request and builds the appropriate HTTP response (redirection to a RemoteBE).

Throws:
BaseException