Class SSOConfigLoader

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.ServletContextListener

    public class SSOConfigLoader
    extends java.lang.Object
    implements javax.servlet.ServletContextListener
    Listener to be inserted into web.xml which will load the SSO configuration on startup. Requires a ServletContext Parameter to be set "ssoclient.config=/sso-config.xml"

    Example

     <context-param>
      <param-name>ssoclient.config</param-name>
      <param-value>/sso-config.xml</param-value>
     </context-param>
     
     <listener>
      <listener-class>uk.ac.warwick.sso.client.SSOConfigLoader</listener-class>
     </listener>
     
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SSO_CACHE_KEY  
      static java.lang.String SSO_CONFIG_KEY  
    • Constructor Summary

      Constructors 
      Constructor Description
      SSOConfigLoader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void contextDestroyed​(javax.servlet.ServletContextEvent arg0)  
      void contextInitialized​(javax.servlet.ServletContextEvent event)  
      uk.ac.warwick.sso.client.SSOConfiguration loadSSOConfig​(java.lang.String ssoConfigLocation)  
      void loadSSOConfig​(javax.servlet.ServletContext servletContext)  
      void storeConfig​(javax.servlet.ServletContext servletContext, java.lang.String configSuffix, uk.ac.warwick.sso.client.SSOConfiguration config)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SSOConfigLoader

        public SSOConfigLoader()
    • Method Detail

      • contextInitialized

        public final void contextInitialized​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • loadSSOConfig

        public uk.ac.warwick.sso.client.SSOConfiguration loadSSOConfig​(java.lang.String ssoConfigLocation)
      • loadSSOConfig

        public void loadSSOConfig​(javax.servlet.ServletContext servletContext)
      • storeConfig

        public void storeConfig​(javax.servlet.ServletContext servletContext,
                                java.lang.String configSuffix,
                                uk.ac.warwick.sso.client.SSOConfiguration config)
      • contextDestroyed

        public final void contextDestroyed​(javax.servlet.ServletContextEvent arg0)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener