GUACAMOLE-641: Allow token retrieval/generation to fail with an error.

This commit is contained in:
Michael Jumper committed 2022-01-22 22:25:04 -08:00
1 parent 1b3361e006
commit 19920eeed1
1 file changed
+12 -2
@@ -83,8 +83,13 @@ public class TokenInjectingUserContext extends DelegatingUserContext {
* @return
* The tokens which should be added to the in-progress call to
* connect().
*
* @throws GuacamoleException
* If the tokens applicable to the given connection cannot be
* generated.
*/
protected Map<String, String> getTokens(Connection connection) {
protected Map<String, String> getTokens(Connection connection)
throws GuacamoleException {
return tokens;
}
@@ -100,8 +105,13 @@ public class TokenInjectingUserContext extends DelegatingUserContext {
* @return
* The tokens which should be added to the in-progress call to
* connect().
*
* @throws GuacamoleException
* If the tokens applicable to the given connection group cannot be
* generated.
*/
protected Map<String, String> getTokens(ConnectionGroup connectionGroup) {
protected Map<String, String> getTokens(ConnectionGroup connectionGroup)
throws GuacamoleException {
return tokens;
}