Re: SLING-5127 - ResourceProviderInfo.authType values clarification

2016-01-28 Thread Carsten Ziegeler
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
cziege...@apache.org


SLING-5127 - ResourceProviderInfo.authType values clarification

2016-01-18 Thread Robert Munteanu
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