[jboss-jira] [JBoss JIRA] (ELY-874) Make ServerAuthenticationContext implement AutoCloseable (with no exceptions)

David Lloyd (JIRA) issues at jboss.org
Fri Jan 13 11:30:00 EST 2017


David Lloyd created ELY-874:
-------------------------------

             Summary: Make ServerAuthenticationContext implement AutoCloseable (with no exceptions)
                 Key: ELY-874
                 URL: https://issues.jboss.org/browse/ELY-874
             Project: WildFly Elytron
          Issue Type: Enhancement
          Components: API / SPI
            Reporter: David Lloyd
            Priority: Minor


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.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list