Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-2411

Add a test case to MappedRegexRealmMapperTest

    XMLWordPrintable

Details

    Description

      A security realm is used to store user information. Realm mappers are responsible for determining which security realm to use based on the username supplied at the start of the authentication process.

      The MappedRegexRealmMapper determines the security realm that should be used by using a regular expression to try to extract the realm related portion of the username. If a match isn't found in the username, it's possible to use a delegate realm mapper instead to identify the realm that should be used.

      Take a look at the two constructors for MappedRegexRealmMapper here. Notice that the second constructor also allows a delegate realm to be used when the regular expression doesn't match any portion of the username.

      The MappedRegexRealmMapperTest.java test class currently only tests the first constructor.

      This task is to add a test to this class that makes use of the second constructor, i.e., that makes use of a delegate realm mapper. The delegate realm mapper can be a simple RealmMapper that just returns a constant realm name, e.g., RealmMapper.single("MY_REALM").

      Attachments

        Activity

          People

            mjusko@redhat.com Marek Jusko
            fjuma1@redhat.com Farah Juma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: