[ 
https://issues.apache.org/jira/browse/SLING-5792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418949#comment-15418949
 ] 

angela edited comment on SLING-5792 at 8/12/16 2:54 PM:
--------------------------------------------------------

[~cziegeler], In this case I might have missed on how to do this efficiently. 
From what I have seen in the Adobe internal code written by [~fmeschbe] (which 
afaik is also the original author of the {{SlingAuthenticator}}) it had to keep 
the exact same information that is stored with the {{SlingAuthenticator}}, 
which just doubles the extra effort for maintaining the auth requirements.

That's why I came up with a dedicated API.
Did you already have time to look at the code in contrib/auth ? Since you are 
an Adobe employee you can compare it with the code that we used today and which 
doesn't look good to me... but maybe I am really just missing the information 
on to use the AuthConstants.AUTH_REQUIREMENTS in an efficient way... obviously 
I was assuming that the original author did it in the best possible way :-)

Anyway: if it turns out to be possible in an efficient way without duplicating 
the tree-set-structure on the service wants to register the requirements, I can 
adjust the code in contrib accordingly.



was (Author: anchela):
[~cziegeler], In this case I might have missed on how to do this efficiently. 
From what I have seen in the Adobe internal code written by [~fmeschbe] (which 
afaik is also the original author of the {{SlingAuthenticator}}) it had to keep 
the exact same information that is stored with the {{SlingAuthenticator}}, 
which just doubles the extra effort for maintaining the auth requirements.

That's why I came up with a dedicated API.
Did you already have time to look at the code in contrib/auth ? Since you are 
an Adobe employee you can compare it with the code that we used today and which 
doesn't look good to me... but maybe I am really just missing the information 
on to use the AuthConstants.AUTH_REQUIREMENTS in an efficient way... obviously 
I was assuming that the original author did it in the best possible way :-)

Anyway: if it turns out to be possible in an efficient way without duplicating 
the tree-structure on the service wants to register the requirements, I can 
adjust the code in contrib accordingly.


> API to manage Authentication Requirement
> ----------------------------------------
>
>                 Key: SLING-5792
>                 URL: https://issues.apache.org/jira/browse/SLING-5792
>             Project: Sling
>          Issue Type: Sub-task
>          Components: Authentication
>            Reporter: angela
>
> Apart from the constant {{AuthConstants.AUTH_REQUIREMENTS}} there is no 
> public API available that allowed applications to change the list of 
> authentication requirement entries.
> Instead, applications need to know and rely on implementation details, which 
> not only includes registering services with the  
> {{AuthConstants.AUTH_REQUIREMENTS}} property included but also know about the 
> required format of the property, which from my point of view should be and 
> remain an implementation detail of 
> {{org.apache.sling.auth.core.impl.SlingAuthenticator}}, which IMO should not 
> be considered public API.
> To me it would feel more natural if there existed a 
> {{AuthenticationRequirement}} interface defining methods to 
> extend/update/clear the auth-requirements bound to a particular service 
> reference and having {{org.apache.sling.auth.core.impl.SlingAuthenticator}} 
> implementing that interface.
> Doing so, might also be beneficial from a performance/scalability POV but I 
> would like to cover that in a separate sub-task.
> Proposal for this sub-tasks will follow as I am moving forward.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to