You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2017/09/27 02:18:03 UTC

[11/29] incubator-guacamole-client git commit: GUACAMOLE-210: Add remaining endpoint properties.

GUACAMOLE-210: Add remaining endpoint properties.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/c20271cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/c20271cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/c20271cb

Branch: refs/heads/master
Commit: c20271cb9941854e46e85a5f975e4fa2aa832fea
Parents: 63b69ad
Author: Michael Jumper <mj...@apache.org>
Authored: Sat Jan 2 21:55:53 2016 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon Sep 25 13:06:43 2017 -0700

----------------------------------------------------------------------
 .../auth/oauth/conf/ConfigurationService.java       | 16 ++++++++++++++++
 .../auth/oauth/conf/OAuthGuacamoleProperties.java   | 11 +++++++++++
 2 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/c20271cb/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/ConfigurationService.java b/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/ConfigurationService.java
index f987218..e1567d2 100644
--- a/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/ConfigurationService.java
+++ b/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/ConfigurationService.java
@@ -51,6 +51,22 @@ public class ConfigurationService {
     }
 
     /**
+     * Returns the token endpoint (URI) of the OAuth service as configured with
+     * guacamole.properties.
+     *
+     * @return
+     *     The token endpoint of the OAuth service, as configured with
+     *     guacamole.properties.
+     *
+     * @throws GuacamoleException
+     *     If guacamole.properties cannot be parsed, or if the authorization
+     *     endpoint property is missing.
+     */
+    public String getTokenEndpoint() throws GuacamoleException {
+        return environment.getRequiredProperty(OAuthGuacamoleProperties.OAUTH_TOKEN_ENDPOINT);
+    }
+
+    /**
      * Returns the OAuth client ID which should be submitted to the OAuth
      * service when necessary, as configured with guacamole.properties. This
      * value is typically provided by the OAuth service when OAuth credentials

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/c20271cb/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/OAuthGuacamoleProperties.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/OAuthGuacamoleProperties.java b/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/OAuthGuacamoleProperties.java
index 2098d45..0ebb94f 100644
--- a/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/OAuthGuacamoleProperties.java
+++ b/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/oauth/conf/OAuthGuacamoleProperties.java
@@ -45,6 +45,17 @@ public class OAuthGuacamoleProperties {
     };
 
     /**
+     * The token endpoint (URI) of the OAuth service.
+     */
+    public static final StringGuacamoleProperty OAUTH_TOKEN_ENDPOINT =
+            new StringGuacamoleProperty() {
+
+        @Override
+        public String getName() { return "oauth-token-endpoint"; }
+
+    };
+
+    /**
      * OAuth client ID which should be submitted to the OAuth service when
      * necessary. This value is typically provided by the OAuth service when
      * OAuth credentials are generated for your application.