[jboss-jira] [JBoss JIRA] (ELY-874) Make ServerAuthenticationContext implement AutoCloseable (with no exceptions)
Darran Lofthouse (JIRA)
issues at jboss.org
Thu Jun 22 11:15:00 EDT 2017
[ https://issues.jboss.org/browse/ELY-874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Darran Lofthouse reassigned ELY-874:
------------------------------------
Assignee: Farah Juma
> 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
> Assignee: Farah Juma
> Priority: Minor
> Fix For: 1.1.0.Beta53
>
>
> 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