mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUACAMOLE-5: Provide most recent Credentials to updateUserContext(). Doing otherwise relies on the AuthenticatedUser being updated, which is not guaranteed to happen.
This commit is contained in:
		| @@ -130,6 +130,11 @@ public interface AuthenticationProvider { | ||||
|      *     this AuthenticationProvider or any other installed | ||||
|      *     AuthenticationProvider. | ||||
|      * | ||||
|      * @param credentials | ||||
|      *     The credentials which were most recently submitted. These are not | ||||
|      *     guaranteed to be the same as the credentials associated with the | ||||
|      *     AuthenticatedUser when they originally authenticated. | ||||
|      * | ||||
|      * @return | ||||
|      *     An updated UserContext describing the permissions, connection, | ||||
|      *     connection groups, etc. accessible or associated with the given | ||||
| @@ -140,6 +145,7 @@ public interface AuthenticationProvider { | ||||
|      *     If an error occurs while updating the UserContext. | ||||
|      */ | ||||
|     UserContext updateUserContext(UserContext context, | ||||
|             AuthenticatedUser authenticatedUser) throws GuacamoleException; | ||||
|             AuthenticatedUser authenticatedUser, | ||||
|             Credentials credentials) throws GuacamoleException; | ||||
|      | ||||
| } | ||||
|   | ||||
| @@ -251,7 +251,8 @@ public abstract class SimpleAuthenticationProvider | ||||
|  | ||||
|     @Override | ||||
|     public UserContext updateUserContext(UserContext context, | ||||
|         AuthenticatedUser authorizedUser) throws GuacamoleException { | ||||
|         AuthenticatedUser authorizedUser, Credentials credentials) | ||||
|             throws GuacamoleException { | ||||
|  | ||||
|         // Simply return the given context, updating nothing | ||||
|         return context; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user