mike-jumper commented on issue #352: GUACAMOLE-684: Insufficient credentials 
should take precedence over other failures
URL: https://github.com/apache/guacamole-client/pull/352#issuecomment-522440399
 
 
   I gave this a fair bit of thought over the course of today, and I think the 
changes you propose are fine. Rather than deviate from existing behavior, I 
believe these changes actually fill a gap in the original intent. My reasoning:
   
   * An extension throws `GuacamoleInsufficientCredentialsException` 
specifically to indicate tentative acceptance of the credentials passed thus 
far.
   * Just as such an extension that fully accepts credentials takes priority 
over an extension that refuses to accept the same, it makes sense to allow an 
extension that *tentatively* accepts those credentials to also take priority.
   
   With the above perspective, authentication result priorities are layered in 
the following order, with ties broken by the inherent order of the auth 
providers (extensions sorted by filename, multiple auth providers within an 
extension maintained in the order declared within `guac-manifest.json`):
   
   1. Acceptance (returning an `AuthenticedUser` instance).
   2. Tentative acceptance (throwing `GuacamoleInvalidCredentialsException`).
   3. Complete refusal (any other subclass of `GuacamoleCredentialsException`).
   4. Neither refusal nor acceptance (returning `null`).
   
   I don't foresee breakage as a result of this, and expect this will remove 
the need to rename extensions in all but unusual cases.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to