From 19920eeed1a211cbbcab08063493a7f120fb7e2a Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 21 Jan 2022 15:23:40 -0800 Subject: [PATCH] GUACAMOLE-641: Allow token retrieval/generation to fail with an error. --- .../net/auth/TokenInjectingUserContext.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/TokenInjectingUserContext.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/TokenInjectingUserContext.java index a1ede96a5..1f6d3d60e 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/TokenInjectingUserContext.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/TokenInjectingUserContext.java @@ -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 getTokens(Connection connection) { + protected Map 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 getTokens(ConnectionGroup connectionGroup) { + protected Map getTokens(ConnectionGroup connectionGroup) + throws GuacamoleException { return tokens; }