Class ForceLoginScreenTypeFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class ForceLoginScreenTypeFilter
    extends java.lang.Object
    implements javax.servlet.Filter
    SSO supports a few alternate login screens for mobile and text-only user agents. By default, SSO client won't use either of these but this filter can force the type used for redirects, so that if a subsequent filter sends the user to the login screen then it will be used instead

    Current known values are "mini" (mobile) and "text" (text only). Leave unset for the default.

    If you have complex user agent needs then you can write your own filter and configure it to set the attribute SSO_SCREEN_TYPE_KEY to "mini" when you want it to show a mobile login screen. You might do some user agent sniffing to detect this.

    (ForceLoginScreenTypeFilter was a bad name as it suggests it's something to do with ForceLoginFilter, or related to forcing login, which it is not.)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SSO_SCREEN_TYPE_KEY  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()  
      void doFilter​(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)  
      java.lang.String getScreenType()  
      void init​(javax.servlet.FilterConfig config)  
      void setScreenType​(java.lang.String screenType)  
      • Methods inherited from class java.lang.Object

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

      • SSO_SCREEN_TYPE_KEY

        public static final java.lang.String SSO_SCREEN_TYPE_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • ForceLoginScreenTypeFilter

        public ForceLoginScreenTypeFilter()
    • Method Detail

      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Filter
      • doFilter

        public final void doFilter​(javax.servlet.ServletRequest req,
                                   javax.servlet.ServletResponse res,
                                   javax.servlet.FilterChain chain)
                            throws java.io.IOException,
                                   javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Throws:
        java.io.IOException
        javax.servlet.ServletException
      • init

        public final void init​(javax.servlet.FilterConfig config)
                        throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Filter
        Throws:
        javax.servlet.ServletException
      • getScreenType

        public final java.lang.String getScreenType()
      • setScreenType

        public final void setScreenType​(java.lang.String screenType)