GUACAMOLE-210: Add remaining endpoint properties.

This commit is contained in:
Michael Jumper
2016-01-02 21:55:53 -08:00
parent 63b69ad076
commit c20271cb99
2 changed files with 27 additions and 0 deletions

View File

@@ -50,6 +50,22 @@ public class ConfigurationService {
return environment.getRequiredProperty(OAuthGuacamoleProperties.OAUTH_AUTHORIZATION_ENDPOINT);
}
/**
* 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

View File

@@ -44,6 +44,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