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

Make ServerAuthenticationContext implement AutoCloseable (with no exceptions)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 1.1.0.Beta53
    • None
    • API / SPI
    • None

      It's pretty easy to forget to clean up a ServerAuthenticationContext when using it directly for simple authentication. We can make this easier by making it implement AutoCloseable with a close() method that fails the authentication if it is still open.

      The logic would basically be similar to if (! isDone()) fail(); but with the difference that it should be atomic, and it should not be declared to throw any exceptions because none are possible in this scenario.

              fjuma1@redhat.com Farah Juma
              dlloyd@redhat.com David Lloyd
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: