Uploaded image for project: 'Seam Faces'
  1. Seam Faces
  2. SEAMFACES-126

Throw some kind of unauthorized exception when auth fails, rather than returning a 401 response

    Details

      Description

      If authorization fails, and the user is not logged in, Faces looks for a @LoginViewId to redirect to, and returns a 401 response if none is found. A similar story applies for the @AccessDeniedViewId

      It would be better to instead throw an exception, that Seam Catch can intercept. If not intercepted, this exception would eventually lead to a 401 response.

        Gliffy Diagrams

          Activity

          Hide
          lightguard Jason Porter added a comment -

          Sounds like it's something in the security model, throwing the exception, and having a packaged catch handler for this would work just fine.

          Show
          lightguard Jason Porter added a comment - Sounds like it's something in the security model, throwing the exception, and having a packaged catch handler for this would work just fine.
          Hide
          lightguard Jason Porter added a comment -

          I think throwing the exception to catch is a really good idea, the users can create their own handlers and do custom actions as they need. We'd create a handler in Faces with a low priority so it's one of the last things to handle the exception.

          Show
          lightguard Jason Porter added a comment - I think throwing the exception to catch is a really good idea, the users can create their own handlers and do custom actions as they need. We'd create a handler in Faces with a low priority so it's one of the last things to handle the exception.
          Hide
          bleathem Brian Leathem added a comment -

          No suitable java., javax. exception seems to exist, so Faces should create one. Possibly extending:
          javax.security.auth.message.AuthException
          http://download.oracle.com/javaee/6/api/javax/security/auth/message/AuthException.html

          Show
          bleathem Brian Leathem added a comment - No suitable java. , javax. exception seems to exist, so Faces should create one. Possibly extending: javax.security.auth.message.AuthException http://download.oracle.com/javaee/6/api/javax/security/auth/message/AuthException.html

            People

            • Assignee:
              lightguard Jason Porter
              Reporter:
              bleathem Brian Leathem
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development