You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2016/01/18 12:02:33 UTC

SLING-5127 - ResourceProviderInfo.authType values clarification

Hi,

I was looking at

  SLING-5217: Verify if login failures to resource providers are
handled correctly

and I tried to follow the logic behind the AuthType enum:

  public enum AuthType { no, lazy, required }

The 'lazy' and 'required' values don't really 'partition' the providers
well IMO, e.g. you can think of a resource provider that is required
and should be lazily authenticated against.

I would suggest the following change

  public enum AuthType { none, lazy, eager }

Thoughts?

Robert

Re: SLING-5127 - ResourceProviderInfo.authType values clarification

Posted by Carsten Ziegeler <cz...@apache.org>.
Robert Munteanu wrote
> Hi,
> 
> I was looking at
> 
>   SLING-5217: Verify if login failures to resource providers are
> handled correctly
> 
> and I tried to follow the logic behind the AuthType enum:
> 
>   public enum AuthType { no, lazy, required }
> 
> The 'lazy' and 'required' values don't really 'partition' the providers
> well IMO, e.g. you can think of a resource provider that is required
> and should be lazily authenticated against.
> 
> I would suggest the following change
> 
>   public enum AuthType { none, lazy, eager }
> 
> Thoughts?
> 

I think this is maybe a wording problem? "required" means, the provider
is required :) and if authentication against it fails, no resource
resolver is created at all. This implies eager as this check needs to be
done on RR creation.

This is in contrast to a pure "eager" where you would expect that
authentication against this provider is tried, but a failure does not
stop the resource resolver from being created.
Whereas lazy means "lazy and not not required".

I'm not against renaming "no" to none (and I guess none is really better).

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org