id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
115,900 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/ObjectPermissionSet.java | ObjectPermissionSet.init | public void init(ModeledAuthenticatedUser currentUser,
ModeledPermissions<? extends EntityModel> entity,
Set<String> effectiveGroups) {
super.init(currentUser);
this.entity = entity;
this.effectiveGroups = effectiveGroups;
} | java | public void init(ModeledAuthenticatedUser currentUser,
ModeledPermissions<? extends EntityModel> entity,
Set<String> effectiveGroups) {
super.init(currentUser);
this.entity = entity;
this.effectiveGroups = effectiveGroups;
} | [
"public",
"void",
"init",
"(",
"ModeledAuthenticatedUser",
"currentUser",
",",
"ModeledPermissions",
"<",
"?",
"extends",
"EntityModel",
">",
"entity",
",",
"Set",
"<",
"String",
">",
"effectiveGroups",
")",
"{",
"super",
".",
"init",
"(",
"currentUser",
")",
... | Initializes this permission set with the current user and the entity
to whom the permissions in this set are granted.
@param currentUser
The user who queried this permission set, and whose permissions
dictate the access level of all operations performed on this set.
@param entity
The entity to whom the permissions in... | [
"Initializes",
"this",
"permission",
"set",
"with",
"the",
"current",
"user",
"and",
"the",
"entity",
"to",
"whom",
"the",
"permissions",
"in",
"this",
"set",
"are",
"granted",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/ObjectPermissionSet.java#L77-L83 |
115,901 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java | AbstractGuacamoleTunnelService.getGuacamoleConfiguration | private GuacamoleConfiguration getGuacamoleConfiguration(RemoteAuthenticatedUser user,
ModeledConnection connection) {
// Generate configuration from available data
GuacamoleConfiguration config = new GuacamoleConfiguration();
// Set protocol from connection
ConnectionModel... | java | private GuacamoleConfiguration getGuacamoleConfiguration(RemoteAuthenticatedUser user,
ModeledConnection connection) {
// Generate configuration from available data
GuacamoleConfiguration config = new GuacamoleConfiguration();
// Set protocol from connection
ConnectionModel... | [
"private",
"GuacamoleConfiguration",
"getGuacamoleConfiguration",
"(",
"RemoteAuthenticatedUser",
"user",
",",
"ModeledConnection",
"connection",
")",
"{",
"// Generate configuration from available data",
"GuacamoleConfiguration",
"config",
"=",
"new",
"GuacamoleConfiguration",
"("... | Returns a guacamole configuration containing the protocol and parameters
from the given connection. If tokens are used in the connection
parameter values, credentials from the given user will be substituted
appropriately.
@param user
The user whose credentials should be used if necessary.
@param connection
The connec... | [
"Returns",
"a",
"guacamole",
"configuration",
"containing",
"the",
"protocol",
"and",
"parameters",
"from",
"the",
"given",
"connection",
".",
"If",
"tokens",
"are",
"used",
"in",
"the",
"connection",
"parameter",
"values",
"credentials",
"from",
"the",
"given",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java#L220-L237 |
115,902 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java | AbstractGuacamoleTunnelService.getGuacamoleConfiguration | private GuacamoleConfiguration getGuacamoleConfiguration(RemoteAuthenticatedUser user,
ModeledSharingProfile sharingProfile, String connectionID) {
// Generate configuration from available data
GuacamoleConfiguration config = new GuacamoleConfiguration();
config.setConnectionID(conn... | java | private GuacamoleConfiguration getGuacamoleConfiguration(RemoteAuthenticatedUser user,
ModeledSharingProfile sharingProfile, String connectionID) {
// Generate configuration from available data
GuacamoleConfiguration config = new GuacamoleConfiguration();
config.setConnectionID(conn... | [
"private",
"GuacamoleConfiguration",
"getGuacamoleConfiguration",
"(",
"RemoteAuthenticatedUser",
"user",
",",
"ModeledSharingProfile",
"sharingProfile",
",",
"String",
"connectionID",
")",
"{",
"// Generate configuration from available data",
"GuacamoleConfiguration",
"config",
"=... | Returns a guacamole configuration which joins the active connection
having the given ID, using the provided sharing profile to restrict the
access provided to the user accessing the shared connection. If tokens
are used in the connection parameter values of the sharing profile,
credentials from the given user will be s... | [
"Returns",
"a",
"guacamole",
"configuration",
"which",
"joins",
"the",
"active",
"connection",
"having",
"the",
"given",
"ID",
"using",
"the",
"provided",
"sharing",
"profile",
"to",
"restrict",
"the",
"access",
"provided",
"to",
"the",
"user",
"accessing",
"the... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java#L262-L276 |
115,903 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java | AbstractGuacamoleTunnelService.saveConnectionRecord | private void saveConnectionRecord(ActiveConnectionRecord record) {
// Get associated models
ConnectionRecordModel recordModel = new ConnectionRecordModel();
// Copy user information and timestamps into new record
recordModel.setUsername(record.getUsername());
recordModel.setCon... | java | private void saveConnectionRecord(ActiveConnectionRecord record) {
// Get associated models
ConnectionRecordModel recordModel = new ConnectionRecordModel();
// Copy user information and timestamps into new record
recordModel.setUsername(record.getUsername());
recordModel.setCon... | [
"private",
"void",
"saveConnectionRecord",
"(",
"ActiveConnectionRecord",
"record",
")",
"{",
"// Get associated models",
"ConnectionRecordModel",
"recordModel",
"=",
"new",
"ConnectionRecordModel",
"(",
")",
";",
"// Copy user information and timestamps into new record",
"record... | Saves the given ActiveConnectionRecord to the database. The end date of
the saved record will be populated with the current time.
@param record
The record to save. | [
"Saves",
"the",
"given",
"ActiveConnectionRecord",
"to",
"the",
"database",
".",
"The",
"end",
"date",
"of",
"the",
"saved",
"record",
"will",
"be",
"populated",
"with",
"the",
"current",
"time",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java#L285-L303 |
115,904 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java | AbstractGuacamoleTunnelService.getUnconfiguredGuacamoleSocket | private GuacamoleSocket getUnconfiguredGuacamoleSocket(
GuacamoleProxyConfiguration proxyConfig,
Runnable socketClosedCallback) throws GuacamoleException {
// Select socket type depending on desired encryption
switch (proxyConfig.getEncryptionMethod()) {
// Use SSL ... | java | private GuacamoleSocket getUnconfiguredGuacamoleSocket(
GuacamoleProxyConfiguration proxyConfig,
Runnable socketClosedCallback) throws GuacamoleException {
// Select socket type depending on desired encryption
switch (proxyConfig.getEncryptionMethod()) {
// Use SSL ... | [
"private",
"GuacamoleSocket",
"getUnconfiguredGuacamoleSocket",
"(",
"GuacamoleProxyConfiguration",
"proxyConfig",
",",
"Runnable",
"socketClosedCallback",
")",
"throws",
"GuacamoleException",
"{",
"// Select socket type depending on desired encryption",
"switch",
"(",
"proxyConfig",... | Returns an unconfigured GuacamoleSocket that is already connected to
guacd as specified in guacamole.properties, using SSL if necessary.
@param proxyConfig
The configuration information to use when connecting to guacd.
@param socketClosedCallback
The callback which should be invoked whenever the returned socket
close... | [
"Returns",
"an",
"unconfigured",
"GuacamoleSocket",
"that",
"is",
"already",
"connected",
"to",
"guacd",
"as",
"specified",
"in",
"guacamole",
".",
"properties",
"using",
"SSL",
"if",
"necessary",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java#L323-L351 |
115,905 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java | AbstractGuacamoleTunnelService.getPreferredConnections | private Collection<String> getPreferredConnections(ModeledAuthenticatedUser user,
Collection<String> identifiers) {
// Search provided identifiers for any preferred connections
for (String identifier : identifiers) {
// If at least one prefferred connection is found, assume it ... | java | private Collection<String> getPreferredConnections(ModeledAuthenticatedUser user,
Collection<String> identifiers) {
// Search provided identifiers for any preferred connections
for (String identifier : identifiers) {
// If at least one prefferred connection is found, assume it ... | [
"private",
"Collection",
"<",
"String",
">",
"getPreferredConnections",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"Collection",
"<",
"String",
">",
"identifiers",
")",
"{",
"// Search provided identifiers for any preferred connections",
"for",
"(",
"String",
"identifier... | Filters the given collection of connection identifiers, returning a new
collection which contains only those identifiers which are preferred. If
no connection identifiers within the given collection are preferred, the
collection is left untouched.
@param user
The user whose preferred connections should be used to filt... | [
"Filters",
"the",
"given",
"collection",
"of",
"connection",
"identifiers",
"returning",
"a",
"new",
"collection",
"which",
"contains",
"only",
"those",
"identifiers",
"which",
"are",
"preferred",
".",
"If",
"no",
"connection",
"identifiers",
"within",
"the",
"giv... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java#L544-L560 |
115,906 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java | AbstractGuacamoleTunnelService.getBalancedConnections | private List<ModeledConnection> getBalancedConnections(ModeledAuthenticatedUser user,
ModeledConnectionGroup connectionGroup) {
// If not a balancing group, there are no balanced connections
if (connectionGroup.getType() != ConnectionGroup.Type.BALANCING)
return Collections.<Mod... | java | private List<ModeledConnection> getBalancedConnections(ModeledAuthenticatedUser user,
ModeledConnectionGroup connectionGroup) {
// If not a balancing group, there are no balanced connections
if (connectionGroup.getType() != ConnectionGroup.Type.BALANCING)
return Collections.<Mod... | [
"private",
"List",
"<",
"ModeledConnection",
">",
"getBalancedConnections",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"ModeledConnectionGroup",
"connectionGroup",
")",
"{",
"// If not a balancing group, there are no balanced connections",
"if",
"(",
"connectionGroup",
".",
... | Returns a list of all balanced connections within a given connection
group. If the connection group is not balancing, or it contains no
connections, an empty list is returned.
@param user
The user on whose behalf the balanced connections within the given
connection group are being retrieved.
@param connectionGroup
Th... | [
"Returns",
"a",
"list",
"of",
"all",
"balanced",
"connections",
"within",
"a",
"given",
"connection",
"group",
".",
"If",
"the",
"connection",
"group",
"is",
"not",
"balancing",
"or",
"it",
"contains",
"no",
"connections",
"an",
"empty",
"list",
"is",
"retur... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java#L578-L607 |
115,907 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/LDAPAuthenticatedUser.java | LDAPAuthenticatedUser.init | public void init(Credentials credentials, Map<String, String> tokens, Set<String> effectiveGroups) {
this.credentials = credentials;
this.tokens = Collections.unmodifiableMap(tokens);
this.effectiveGroups = effectiveGroups;
setIdentifier(credentials.getUsername());
} | java | public void init(Credentials credentials, Map<String, String> tokens, Set<String> effectiveGroups) {
this.credentials = credentials;
this.tokens = Collections.unmodifiableMap(tokens);
this.effectiveGroups = effectiveGroups;
setIdentifier(credentials.getUsername());
} | [
"public",
"void",
"init",
"(",
"Credentials",
"credentials",
",",
"Map",
"<",
"String",
",",
"String",
">",
"tokens",
",",
"Set",
"<",
"String",
">",
"effectiveGroups",
")",
"{",
"this",
".",
"credentials",
"=",
"credentials",
";",
"this",
".",
"tokens",
... | Initializes this AuthenticatedUser with the given credentials,
connection parameter tokens. and set of effective user groups.
@param credentials
The credentials provided when this user was authenticated.
@param tokens
A Map of all name/value pairs that should be applied as parameter
tokens when connections are establ... | [
"Initializes",
"this",
"AuthenticatedUser",
"with",
"the",
"given",
"credentials",
"connection",
"parameter",
"tokens",
".",
"and",
"set",
"of",
"effective",
"user",
"groups",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/LDAPAuthenticatedUser.java#L75-L80 |
115,908 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/TokenName.java | TokenName.fromAttribute | public static String fromAttribute(String name) {
// If even one logical word grouping cannot be found, default to
// simply converting the attribute to uppercase and adding the
// prefix
Matcher groupMatcher = LDAP_ATTRIBUTE_NAME_GROUPING.matcher(name);
if (!groupMatcher.find()... | java | public static String fromAttribute(String name) {
// If even one logical word grouping cannot be found, default to
// simply converting the attribute to uppercase and adding the
// prefix
Matcher groupMatcher = LDAP_ATTRIBUTE_NAME_GROUPING.matcher(name);
if (!groupMatcher.find()... | [
"public",
"static",
"String",
"fromAttribute",
"(",
"String",
"name",
")",
"{",
"// If even one logical word grouping cannot be found, default to",
"// simply converting the attribute to uppercase and adding the",
"// prefix",
"Matcher",
"groupMatcher",
"=",
"LDAP_ATTRIBUTE_NAME_GROUPI... | Generates the name of the parameter token that should be populated with
the value of the given LDAP attribute. The name of the LDAP attribute
will automatically be transformed from "CamelCase", "headlessCamelCase",
"lowercase_with_underscores", and "mixes_ofBoth_Styles" to consistent
"UPPERCASE_WITH_UNDERSCORES". Each ... | [
"Generates",
"the",
"name",
"of",
"the",
"parameter",
"token",
"that",
"should",
"be",
"populated",
"with",
"the",
"value",
"of",
"the",
"given",
"LDAP",
"attribute",
".",
"The",
"name",
"of",
"the",
"LDAP",
"attribute",
"will",
"automatically",
"be",
"trans... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/TokenName.java#L83-L104 |
115,909 | glyptodon/guacamole-client | extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/utility/QCParser.java | QCParser.getConfiguration | public static GuacamoleConfiguration getConfiguration(String uri)
throws GuacamoleException {
// Parse the provided String into a URI object.
URI qcUri;
try {
qcUri = new URI(uri);
if (!qcUri.isAbsolute())
throw new QuickConnectException("URI ... | java | public static GuacamoleConfiguration getConfiguration(String uri)
throws GuacamoleException {
// Parse the provided String into a URI object.
URI qcUri;
try {
qcUri = new URI(uri);
if (!qcUri.isAbsolute())
throw new QuickConnectException("URI ... | [
"public",
"static",
"GuacamoleConfiguration",
"getConfiguration",
"(",
"String",
"uri",
")",
"throws",
"GuacamoleException",
"{",
"// Parse the provided String into a URI object.",
"URI",
"qcUri",
";",
"try",
"{",
"qcUri",
"=",
"new",
"URI",
"(",
"uri",
")",
";",
"i... | Parse out a URI string and get a GuacamoleConfiguration
from that string, or an exception if the parsing fails.
@param uri
The string form of the URI to be parsed.
@return
A GuacamoleConfiguration generated using the information
provided by the user in the URI.
@throws GuacamoleException
If an error occurs parsing t... | [
"Parse",
"out",
"a",
"URI",
"string",
"and",
"get",
"a",
"GuacamoleConfiguration",
"from",
"that",
"string",
"or",
"an",
"exception",
"if",
"the",
"parsing",
"fails",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/utility/QCParser.java#L73-L143 |
115,910 | glyptodon/guacamole-client | extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/utility/QCParser.java | QCParser.parseUserInfo | public static void parseUserInfo(String userInfo,
GuacamoleConfiguration config)
throws UnsupportedEncodingException {
Matcher userinfoMatcher = userinfoPattern.matcher(userInfo);
if (userinfoMatcher.matches()) {
String username = userinfoMatcher.group(USERNAME_GRO... | java | public static void parseUserInfo(String userInfo,
GuacamoleConfiguration config)
throws UnsupportedEncodingException {
Matcher userinfoMatcher = userinfoPattern.matcher(userInfo);
if (userinfoMatcher.matches()) {
String username = userinfoMatcher.group(USERNAME_GRO... | [
"public",
"static",
"void",
"parseUserInfo",
"(",
"String",
"userInfo",
",",
"GuacamoleConfiguration",
"config",
")",
"throws",
"UnsupportedEncodingException",
"{",
"Matcher",
"userinfoMatcher",
"=",
"userinfoPattern",
".",
"matcher",
"(",
"userInfo",
")",
";",
"if",
... | Parse the given string for username and password values,
and, if values are present, decode them and set them in
the provided GuacamoleConfiguration object.
@param userInfo
The string to parse for username/password values.
@param config
The GuacamoleConfiguration object to store the username
and password in.
@throws... | [
"Parse",
"the",
"given",
"string",
"for",
"username",
"and",
"password",
"values",
"and",
"if",
"values",
"are",
"present",
"decode",
"them",
"and",
"set",
"them",
"in",
"the",
"provided",
"GuacamoleConfiguration",
"object",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/utility/QCParser.java#L190-L209 |
115,911 | glyptodon/guacamole-client | extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/utility/QCParser.java | QCParser.getName | public static String getName(GuacamoleConfiguration config)
throws GuacamoleException {
if (config == null)
return null;
String protocol = config.getProtocol();
String host = config.getParameter("hostname");
String port = config.getParameter("port");
Str... | java | public static String getName(GuacamoleConfiguration config)
throws GuacamoleException {
if (config == null)
return null;
String protocol = config.getProtocol();
String host = config.getParameter("hostname");
String port = config.getParameter("port");
Str... | [
"public",
"static",
"String",
"getName",
"(",
"GuacamoleConfiguration",
"config",
")",
"throws",
"GuacamoleException",
"{",
"if",
"(",
"config",
"==",
"null",
")",
"return",
"null",
";",
"String",
"protocol",
"=",
"config",
".",
"getProtocol",
"(",
")",
";",
... | Given a GuacamoleConfiguration object, generate a name
for the configuration based on the protocol, host, user
and port in the configuration, and return the string value.
@param config
The GuacamoleConfiguration object to use to generate
the name.
@return
The String value of the name that is generated.
@throws Guaca... | [
"Given",
"a",
"GuacamoleConfiguration",
"object",
"generate",
"a",
"name",
"for",
"the",
"configuration",
"based",
"on",
"the",
"protocol",
"host",
"user",
"and",
"port",
"in",
"the",
"configuration",
"and",
"return",
"the",
"string",
"value",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/utility/QCParser.java#L226-L254 |
115,912 | glyptodon/guacamole-client | extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java | UserVerificationService.verifyAuthenticatedUser | public void verifyAuthenticatedUser(AuthenticatedUser authenticatedUser)
throws GuacamoleException {
// Pull the original HTTP request used to authenticate
Credentials credentials = authenticatedUser.getCredentials();
HttpServletRequest request = credentials.getRequest();
/... | java | public void verifyAuthenticatedUser(AuthenticatedUser authenticatedUser)
throws GuacamoleException {
// Pull the original HTTP request used to authenticate
Credentials credentials = authenticatedUser.getCredentials();
HttpServletRequest request = credentials.getRequest();
/... | [
"public",
"void",
"verifyAuthenticatedUser",
"(",
"AuthenticatedUser",
"authenticatedUser",
")",
"throws",
"GuacamoleException",
"{",
"// Pull the original HTTP request used to authenticate",
"Credentials",
"credentials",
"=",
"authenticatedUser",
".",
"getCredentials",
"(",
")",... | Verifies the identity of the given user via the Duo multi-factor
authentication service. If a signed response from Duo has not already
been provided, a signed response from Duo is requested in the
form of additional expected credentials. Any provided signed response
is cryptographically verified. If no signed response ... | [
"Verifies",
"the",
"identity",
"of",
"the",
"given",
"user",
"via",
"the",
"Duo",
"multi",
"-",
"factor",
"authentication",
"service",
".",
"If",
"a",
"signed",
"response",
"from",
"Duo",
"has",
"not",
"already",
"been",
"provided",
"a",
"signed",
"response"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java#L68-L107 |
115,913 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/auth/file/Authorization.java | Authorization.getHexString | private static String getHexString(byte[] bytes) {
// If null byte array given, return null
if (bytes == null)
return null;
// Create string builder for holding the hex representation,
// pre-calculating the exact length
StringBuilder hex = new StringBuilder(2 * byt... | java | private static String getHexString(byte[] bytes) {
// If null byte array given, return null
if (bytes == null)
return null;
// Create string builder for holding the hex representation,
// pre-calculating the exact length
StringBuilder hex = new StringBuilder(2 * byt... | [
"private",
"static",
"String",
"getHexString",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"// If null byte array given, return null",
"if",
"(",
"bytes",
"==",
"null",
")",
"return",
"null",
";",
"// Create string builder for holding the hex representation,",
"// pre-calcu... | Produces a String containing the bytes provided in hexadecimal notation.
@param bytes The bytes to convert into hex.
@return A String containing the hex representation of the given bytes. | [
"Produces",
"a",
"String",
"containing",
"the",
"bytes",
"provided",
"in",
"hexadecimal",
"notation",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/auth/file/Authorization.java#L89-L108 |
115,914 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledChildDirectoryObjectService.java | ModeledChildDirectoryObjectService.canUpdateModifiedParents | protected boolean canUpdateModifiedParents(ModeledAuthenticatedUser user,
String identifier, ModelType model) throws GuacamoleException {
// If user is an administrator, no need to check
if (user.getUser().isAdministrator())
return true;
// Verify that we have p... | java | protected boolean canUpdateModifiedParents(ModeledAuthenticatedUser user,
String identifier, ModelType model) throws GuacamoleException {
// If user is an administrator, no need to check
if (user.getUser().isAdministrator())
return true;
// Verify that we have p... | [
"protected",
"boolean",
"canUpdateModifiedParents",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"String",
"identifier",
",",
"ModelType",
"model",
")",
"throws",
"GuacamoleException",
"{",
"// If user is an administrator, no need to check",
"if",
"(",
"user",
".",
"getUse... | Returns whether the given user has permission to modify the parents
affected by the modifications made to the given model object.
@param user
The user who changed the model object.
@param identifier
The identifier of the object that has been modified, if it exists.
If the object is being created, this will be null.
... | [
"Returns",
"whether",
"the",
"given",
"user",
"has",
"permission",
"to",
"modify",
"the",
"parents",
"affected",
"by",
"the",
"modifications",
"made",
"to",
"the",
"given",
"model",
"object",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledChildDirectoryObjectService.java#L148-L171 |
115,915 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/Extension.java | Extension.getClassPathResources | private Map<String, Resource> getClassPathResources(String mimetype, Collection<String> paths) {
// If no paths are provided, just return an empty map
if (paths == null)
return Collections.<String, Resource>emptyMap();
// Add classpath resource for each path provided
Map<S... | java | private Map<String, Resource> getClassPathResources(String mimetype, Collection<String> paths) {
// If no paths are provided, just return an empty map
if (paths == null)
return Collections.<String, Resource>emptyMap();
// Add classpath resource for each path provided
Map<S... | [
"private",
"Map",
"<",
"String",
",",
"Resource",
">",
"getClassPathResources",
"(",
"String",
"mimetype",
",",
"Collection",
"<",
"String",
">",
"paths",
")",
"{",
"// If no paths are provided, just return an empty map ",
"if",
"(",
"paths",
"==",
"null",
")",
"r... | Returns a new map of all resources corresponding to the collection of
paths provided. Each resource will be associated with the given
mimetype, and stored in the map using its path as the key.
@param mimetype
The mimetype to associate with each resource.
@param paths
The paths corresponding to the resources desired.
... | [
"Returns",
"a",
"new",
"map",
"of",
"all",
"resources",
"corresponding",
"to",
"the",
"collection",
"of",
"paths",
"provided",
".",
"Each",
"resource",
"will",
"be",
"associated",
"with",
"the",
"given",
"mimetype",
"and",
"stored",
"in",
"the",
"map",
"usin... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/Extension.java#L140-L154 |
115,916 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/Extension.java | Extension.getClassPathResources | private Map<String, Resource> getClassPathResources(Map<String, String> resourceTypes) {
// If no paths are provided, just return an empty map
if (resourceTypes == null)
return Collections.<String, Resource>emptyMap();
// Add classpath resource for each path/mimetype pair provided... | java | private Map<String, Resource> getClassPathResources(Map<String, String> resourceTypes) {
// If no paths are provided, just return an empty map
if (resourceTypes == null)
return Collections.<String, Resource>emptyMap();
// Add classpath resource for each path/mimetype pair provided... | [
"private",
"Map",
"<",
"String",
",",
"Resource",
">",
"getClassPathResources",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"resourceTypes",
")",
"{",
"// If no paths are provided, just return an empty map ",
"if",
"(",
"resourceTypes",
"==",
"null",
")",
"return... | Returns a new map of all resources corresponding to the map of resource
paths provided. Each resource will be associated with the mimetype
stored in the given map using its path as the key.
@param resourceTypes
A map of all paths to their corresponding mimetypes.
@return
A new, unmodifiable map of resources correspon... | [
"Returns",
"a",
"new",
"map",
"of",
"all",
"resources",
"corresponding",
"to",
"the",
"map",
"of",
"resource",
"paths",
"provided",
".",
"Each",
"resource",
"will",
"be",
"associated",
"with",
"the",
"mimetype",
"stored",
"in",
"the",
"given",
"map",
"using"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/Extension.java#L169-L191 |
115,917 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/Extension.java | Extension.getAuthenticationProviderClass | @SuppressWarnings("unchecked") // We check this ourselves with isAssignableFrom()
private Class<AuthenticationProvider> getAuthenticationProviderClass(String name)
throws GuacamoleException {
try {
// Get authentication provider class
Class<?> authenticationProviderClas... | java | @SuppressWarnings("unchecked") // We check this ourselves with isAssignableFrom()
private Class<AuthenticationProvider> getAuthenticationProviderClass(String name)
throws GuacamoleException {
try {
// Get authentication provider class
Class<?> authenticationProviderClas... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"// We check this ourselves with isAssignableFrom()",
"private",
"Class",
"<",
"AuthenticationProvider",
">",
"getAuthenticationProviderClass",
"(",
"String",
"name",
")",
"throws",
"GuacamoleException",
"{",
"try",
"{",
"... | Retrieve the AuthenticationProvider subclass having the given name. If
the class having the given name does not exist or isn't actually a
subclass of AuthenticationProvider, an exception will be thrown.
@param name
The name of the AuthenticationProvider class to retrieve.
@return
The subclass of AuthenticationProvide... | [
"Retrieve",
"the",
"AuthenticationProvider",
"subclass",
"having",
"the",
"given",
"name",
".",
"If",
"the",
"class",
"having",
"the",
"given",
"name",
"does",
"not",
"exist",
"or",
"isn",
"t",
"actually",
"a",
"subclass",
"of",
"AuthenticationProvider",
"an",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/Extension.java#L208-L232 |
115,918 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/Extension.java | Extension.getAuthenticationProviderClasses | private Collection<Class<AuthenticationProvider>> getAuthenticationProviderClasses(Collection<String> names)
throws GuacamoleException {
// If no classnames are provided, just return an empty list
if (names == null)
return Collections.<Class<AuthenticationProvider>>emptyList();
... | java | private Collection<Class<AuthenticationProvider>> getAuthenticationProviderClasses(Collection<String> names)
throws GuacamoleException {
// If no classnames are provided, just return an empty list
if (names == null)
return Collections.<Class<AuthenticationProvider>>emptyList();
... | [
"private",
"Collection",
"<",
"Class",
"<",
"AuthenticationProvider",
">",
">",
"getAuthenticationProviderClasses",
"(",
"Collection",
"<",
"String",
">",
"names",
")",
"throws",
"GuacamoleException",
"{",
"// If no classnames are provided, just return an empty list",
"if",
... | Returns a new collection of all AuthenticationProvider subclasses having
the given names. If any class does not exist or isn't actually a
subclass of AuthenticationProvider, an exception will be thrown, and
no further AuthenticationProvider classes will be loaded.
@param names
The names of the AuthenticationProvider c... | [
"Returns",
"a",
"new",
"collection",
"of",
"all",
"AuthenticationProvider",
"subclasses",
"having",
"the",
"given",
"names",
".",
"If",
"any",
"class",
"does",
"not",
"exist",
"or",
"isn",
"t",
"actually",
"a",
"subclass",
"of",
"AuthenticationProvider",
"an",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/Extension.java#L251-L266 |
115,919 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/Extension.java | Extension.getListenerClass | @SuppressWarnings("unchecked") // We check this ourselves with isAssignableFrom()
private Class<Listener> getListenerClass(String name)
throws GuacamoleException {
try {
// Get listener class
Class<?> listenerClass = classLoader.loadClass(name);
// Verify t... | java | @SuppressWarnings("unchecked") // We check this ourselves with isAssignableFrom()
private Class<Listener> getListenerClass(String name)
throws GuacamoleException {
try {
// Get listener class
Class<?> listenerClass = classLoader.loadClass(name);
// Verify t... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"// We check this ourselves with isAssignableFrom()",
"private",
"Class",
"<",
"Listener",
">",
"getListenerClass",
"(",
"String",
"name",
")",
"throws",
"GuacamoleException",
"{",
"try",
"{",
"// Get listener class",
"C... | Retrieve the Listener subclass having the given name. If
the class having the given name does not exist or isn't actually a
subclass of Listener, an exception will be thrown.
@param name
The name of the Listener class to retrieve.
@return
The subclass of Listener having the given name.
@throws GuacamoleException
If ... | [
"Retrieve",
"the",
"Listener",
"subclass",
"having",
"the",
"given",
"name",
".",
"If",
"the",
"class",
"having",
"the",
"given",
"name",
"does",
"not",
"exist",
"or",
"isn",
"t",
"actually",
"a",
"subclass",
"of",
"Listener",
"an",
"exception",
"will",
"b... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/Extension.java#L283-L307 |
115,920 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/Extension.java | Extension.getListenerClasses | private Collection<Class<?>> getListenerClasses(Collection<String> names)
throws GuacamoleException {
// If no classnames are provided, just return an empty list
if (names == null)
return Collections.<Class<?>>emptyList();
// Define all auth provider classes
Col... | java | private Collection<Class<?>> getListenerClasses(Collection<String> names)
throws GuacamoleException {
// If no classnames are provided, just return an empty list
if (names == null)
return Collections.<Class<?>>emptyList();
// Define all auth provider classes
Col... | [
"private",
"Collection",
"<",
"Class",
"<",
"?",
">",
">",
"getListenerClasses",
"(",
"Collection",
"<",
"String",
">",
"names",
")",
"throws",
"GuacamoleException",
"{",
"// If no classnames are provided, just return an empty list",
"if",
"(",
"names",
"==",
"null",
... | Returns a new collection of all Listener subclasses having the given names.
If any class does not exist or isn't actually subclass of Listener, an
exception will be thrown, an no further Listener classes will be loaded.
@param names
The names of the AuthenticationProvider classes to retrieve.
@return
A new collection... | [
"Returns",
"a",
"new",
"collection",
"of",
"all",
"Listener",
"subclasses",
"having",
"the",
"given",
"names",
".",
"If",
"any",
"class",
"does",
"not",
"exist",
"or",
"isn",
"t",
"actually",
"subclass",
"of",
"Listener",
"an",
"exception",
"will",
"be",
"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/Extension.java#L325-L339 |
115,921 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionResource.java | ActiveConnectionResource.getConnection | @Path("connection")
public DirectoryObjectResource<Connection, APIConnection> getConnection()
throws GuacamoleException {
// Return the underlying connection as a resource
return connectionDirectoryResourceFactory
.create(userContext, userContext.getConnectionDirectory()... | java | @Path("connection")
public DirectoryObjectResource<Connection, APIConnection> getConnection()
throws GuacamoleException {
// Return the underlying connection as a resource
return connectionDirectoryResourceFactory
.create(userContext, userContext.getConnectionDirectory()... | [
"@",
"Path",
"(",
"\"connection\"",
")",
"public",
"DirectoryObjectResource",
"<",
"Connection",
",",
"APIConnection",
">",
"getConnection",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Return the underlying connection as a resource",
"return",
"connectionDirectoryResou... | Retrieves a resource representing the Connection object that is being
actively used.
@return
A resource representing the Connection object that is being actively
used.
@throws GuacamoleException
If an error occurs while retrieving the Connection. | [
"Retrieves",
"a",
"resource",
"representing",
"the",
"Connection",
"object",
"that",
"is",
"being",
"actively",
"used",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionResource.java#L108-L117 |
115,922 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/GuacamoleWebSocketTunnelListener.java | GuacamoleWebSocketTunnelListener.closeConnection | private void closeConnection(Session session, int guacamoleStatusCode,
int webSocketCode) {
try {
String message = Integer.toString(guacamoleStatusCode);
session.close(new CloseStatus(webSocketCode, message));
}
catch (IOException e) {
logger.debu... | java | private void closeConnection(Session session, int guacamoleStatusCode,
int webSocketCode) {
try {
String message = Integer.toString(guacamoleStatusCode);
session.close(new CloseStatus(webSocketCode, message));
}
catch (IOException e) {
logger.debu... | [
"private",
"void",
"closeConnection",
"(",
"Session",
"session",
",",
"int",
"guacamoleStatusCode",
",",
"int",
"webSocketCode",
")",
"{",
"try",
"{",
"String",
"message",
"=",
"Integer",
".",
"toString",
"(",
"guacamoleStatusCode",
")",
";",
"session",
".",
"... | Sends the given numeric Guacamole and WebSocket status
codes on the given WebSocket connection and closes the
connection.
@param session
The outbound WebSocket connection to close.
@param guacamoleStatusCode
The numeric Guacamole status code to send.
@param webSocketCode
The numeric WebSocket status code to send. | [
"Sends",
"the",
"given",
"numeric",
"Guacamole",
"and",
"WebSocket",
"status",
"codes",
"on",
"the",
"given",
"WebSocket",
"connection",
"and",
"closes",
"the",
"connection",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/GuacamoleWebSocketTunnelListener.java#L92-L103 |
115,923 | glyptodon/guacamole-client | extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java | UserVerificationService.getKey | private UserTOTPKey getKey(UserContext context,
String username) throws GuacamoleException {
// Retrieve attributes from current user
User self = context.self();
Map<String, String> attributes = context.self().getAttributes();
// If no key is defined, attempt to generate a ... | java | private UserTOTPKey getKey(UserContext context,
String username) throws GuacamoleException {
// Retrieve attributes from current user
User self = context.self();
Map<String, String> attributes = context.self().getAttributes();
// If no key is defined, attempt to generate a ... | [
"private",
"UserTOTPKey",
"getKey",
"(",
"UserContext",
"context",
",",
"String",
"username",
")",
"throws",
"GuacamoleException",
"{",
"// Retrieve attributes from current user",
"User",
"self",
"=",
"context",
".",
"self",
"(",
")",
";",
"Map",
"<",
"String",
",... | Retrieves and decodes the base32-encoded TOTP key associated with user
having the given UserContext. If no TOTP key is associated with the user,
a random key is generated and associated with the user. If the extension
storing the user does not support storage of the TOTP key, null is
returned.
@param context
The UserC... | [
"Retrieves",
"and",
"decodes",
"the",
"base32",
"-",
"encoded",
"TOTP",
"key",
"associated",
"with",
"user",
"having",
"the",
"given",
"UserContext",
".",
"If",
"no",
"TOTP",
"key",
"is",
"associated",
"with",
"the",
"user",
"a",
"random",
"key",
"is",
"ge... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java#L102-L142 |
115,924 | glyptodon/guacamole-client | extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java | UserVerificationService.setKey | private boolean setKey(UserContext context, UserTOTPKey key)
throws GuacamoleException {
// Get mutable set of attributes
User self = context.self();
Map<String, String> attributes = new HashMap<String, String>();
// Set/overwrite current TOTP key state
attributes.p... | java | private boolean setKey(UserContext context, UserTOTPKey key)
throws GuacamoleException {
// Get mutable set of attributes
User self = context.self();
Map<String, String> attributes = new HashMap<String, String>();
// Set/overwrite current TOTP key state
attributes.p... | [
"private",
"boolean",
"setKey",
"(",
"UserContext",
"context",
",",
"UserTOTPKey",
"key",
")",
"throws",
"GuacamoleException",
"{",
"// Get mutable set of attributes",
"User",
"self",
"=",
"context",
".",
"self",
"(",
")",
";",
"Map",
"<",
"String",
",",
"String... | Attempts to store the given TOTP key within the user account of the user
having the given UserContext. As not all extensions will support storage
of arbitrary attributes, this operation may fail.
@param context
The UserContext associated with the user whose TOTP key is to be
stored.
@param key
The TOTP key to store.
... | [
"Attempts",
"to",
"store",
"the",
"given",
"TOTP",
"key",
"within",
"the",
"user",
"account",
"of",
"the",
"user",
"having",
"the",
"given",
"UserContext",
".",
"As",
"not",
"all",
"extensions",
"will",
"support",
"storage",
"of",
"arbitrary",
"attributes",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java#L164-L204 |
115,925 | glyptodon/guacamole-client | extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java | UserVerificationService.verifyIdentity | public void verifyIdentity(UserContext context,
AuthenticatedUser authenticatedUser) throws GuacamoleException {
// Ignore anonymous users
String username = authenticatedUser.getIdentifier();
if (username.equals(AuthenticatedUser.ANONYMOUS_IDENTIFIER))
return;
/... | java | public void verifyIdentity(UserContext context,
AuthenticatedUser authenticatedUser) throws GuacamoleException {
// Ignore anonymous users
String username = authenticatedUser.getIdentifier();
if (username.equals(AuthenticatedUser.ANONYMOUS_IDENTIFIER))
return;
/... | [
"public",
"void",
"verifyIdentity",
"(",
"UserContext",
"context",
",",
"AuthenticatedUser",
"authenticatedUser",
")",
"throws",
"GuacamoleException",
"{",
"// Ignore anonymous users",
"String",
"username",
"=",
"authenticatedUser",
".",
"getIdentifier",
"(",
")",
";",
... | Verifies the identity of the given user using TOTP. If a authentication
code from the user's TOTP device has not already been provided, a code is
requested in the form of additional expected credentials. Any provided
code is cryptographically verified. If no code is present, or the
received code is invalid, an exceptio... | [
"Verifies",
"the",
"identity",
"of",
"the",
"given",
"user",
"using",
"TOTP",
".",
"If",
"a",
"authentication",
"code",
"from",
"the",
"user",
"s",
"TOTP",
"device",
"has",
"not",
"already",
"been",
"provided",
"a",
"code",
"is",
"requested",
"in",
"the",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java#L224-L296 |
115,926 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/OutputStreamInterceptingFilter.java | OutputStreamInterceptingFilter.handleBlob | private GuacamoleInstruction handleBlob(GuacamoleInstruction instruction) {
// Verify all required arguments are present
List<String> args = instruction.getArgs();
if (args.size() < 2)
return instruction;
// Pull associated stream
String index = args.get(0);
... | java | private GuacamoleInstruction handleBlob(GuacamoleInstruction instruction) {
// Verify all required arguments are present
List<String> args = instruction.getArgs();
if (args.size() < 2)
return instruction;
// Pull associated stream
String index = args.get(0);
... | [
"private",
"GuacamoleInstruction",
"handleBlob",
"(",
"GuacamoleInstruction",
"instruction",
")",
"{",
"// Verify all required arguments are present",
"List",
"<",
"String",
">",
"args",
"=",
"instruction",
".",
"getArgs",
"(",
")",
";",
"if",
"(",
"args",
".",
"siz... | Handles a single "blob" instruction, decoding its base64 data,
sending that data to the associated OutputStream, and ultimately
dropping the "blob" instruction such that the client never receives
it. If no OutputStream is associated with the stream index within
the "blob" instruction, the instruction is passed through ... | [
"Handles",
"a",
"single",
"blob",
"instruction",
"decoding",
"its",
"base64",
"data",
"sending",
"that",
"data",
"to",
"the",
"associated",
"OutputStream",
"and",
"ultimately",
"dropping",
"the",
"blob",
"instruction",
"such",
"that",
"the",
"client",
"never",
"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/OutputStreamInterceptingFilter.java#L113-L163 |
115,927 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/OutputStreamInterceptingFilter.java | OutputStreamInterceptingFilter.handleEnd | private void handleEnd(GuacamoleInstruction instruction) {
// Verify all required arguments are present
List<String> args = instruction.getArgs();
if (args.size() < 1)
return;
// Terminate stream
closeInterceptedStream(args.get(0));
} | java | private void handleEnd(GuacamoleInstruction instruction) {
// Verify all required arguments are present
List<String> args = instruction.getArgs();
if (args.size() < 1)
return;
// Terminate stream
closeInterceptedStream(args.get(0));
} | [
"private",
"void",
"handleEnd",
"(",
"GuacamoleInstruction",
"instruction",
")",
"{",
"// Verify all required arguments are present",
"List",
"<",
"String",
">",
"args",
"=",
"instruction",
".",
"getArgs",
"(",
")",
";",
"if",
"(",
"args",
".",
"size",
"(",
")",... | Handles a single "end" instruction, closing the associated
OutputStream. If no OutputStream is associated with the stream index
within the "end" instruction, this function has no effect.
@param instruction
The "end" instruction being handled. | [
"Handles",
"a",
"single",
"end",
"instruction",
"closing",
"the",
"associated",
"OutputStream",
".",
"If",
"no",
"OutputStream",
"is",
"associated",
"with",
"the",
"stream",
"index",
"within",
"the",
"end",
"instruction",
"this",
"function",
"has",
"no",
"effect... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/OutputStreamInterceptingFilter.java#L173-L183 |
115,928 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleObjectPermissionSet.java | SimpleObjectPermissionSet.createPermissions | private static Set<ObjectPermission> createPermissions(Collection<String> identifiers,
Collection<ObjectPermission.Type> types) {
// Add a permission of each type to the set for each identifier given
Set<ObjectPermission> permissions = new HashSet<>(identifiers.size());
types.forEac... | java | private static Set<ObjectPermission> createPermissions(Collection<String> identifiers,
Collection<ObjectPermission.Type> types) {
// Add a permission of each type to the set for each identifier given
Set<ObjectPermission> permissions = new HashSet<>(identifiers.size());
types.forEac... | [
"private",
"static",
"Set",
"<",
"ObjectPermission",
">",
"createPermissions",
"(",
"Collection",
"<",
"String",
">",
"identifiers",
",",
"Collection",
"<",
"ObjectPermission",
".",
"Type",
">",
"types",
")",
"{",
"// Add a permission of each type to the set for each id... | Creates a new set of ObjectPermissions for each possible combination of
the given identifiers and permission types.
@param identifiers
The identifiers which should have one ObjectPermission for each of
the given permission types.
@param types
The permissions which should be granted for each of the given
identifiers.
... | [
"Creates",
"a",
"new",
"set",
"of",
"ObjectPermissions",
"for",
"each",
"possible",
"combination",
"of",
"the",
"given",
"identifiers",
"and",
"permission",
"types",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleObjectPermissionSet.java#L69-L80 |
115,929 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/permission/APIPermissionSet.java | APIPermissionSet.addSystemPermissions | private void addSystemPermissions(Set<SystemPermission.Type> permissions,
SystemPermissionSet permSet) throws GuacamoleException {
// Add all provided system permissions
for (SystemPermission permission : permSet.getPermissions())
permissions.add(permission.getType());
} | java | private void addSystemPermissions(Set<SystemPermission.Type> permissions,
SystemPermissionSet permSet) throws GuacamoleException {
// Add all provided system permissions
for (SystemPermission permission : permSet.getPermissions())
permissions.add(permission.getType());
} | [
"private",
"void",
"addSystemPermissions",
"(",
"Set",
"<",
"SystemPermission",
".",
"Type",
">",
"permissions",
",",
"SystemPermissionSet",
"permSet",
")",
"throws",
"GuacamoleException",
"{",
"// Add all provided system permissions ",
"for",
"(",
"SystemPermission",
"pe... | Adds the system permissions from the given SystemPermissionSet to the
Set of system permissions provided.
@param permissions
The Set to add system permissions to.
@param permSet
The SystemPermissionSet containing the system permissions to add.
@throws GuacamoleException
If an error occurs while retrieving system per... | [
"Adds",
"the",
"system",
"permissions",
"from",
"the",
"given",
"SystemPermissionSet",
"to",
"the",
"Set",
"of",
"system",
"permissions",
"provided",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/permission/APIPermissionSet.java#L108-L115 |
115,930 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/permission/APIPermissionSet.java | APIPermissionSet.addObjectPermissions | private void addObjectPermissions(Map<String, Set<ObjectPermission.Type>> permissions,
ObjectPermissionSet permSet) throws GuacamoleException {
// Add all provided object permissions
for (ObjectPermission permission : permSet.getPermissions()) {
// Get associated set of permis... | java | private void addObjectPermissions(Map<String, Set<ObjectPermission.Type>> permissions,
ObjectPermissionSet permSet) throws GuacamoleException {
// Add all provided object permissions
for (ObjectPermission permission : permSet.getPermissions()) {
// Get associated set of permis... | [
"private",
"void",
"addObjectPermissions",
"(",
"Map",
"<",
"String",
",",
"Set",
"<",
"ObjectPermission",
".",
"Type",
">",
">",
"permissions",
",",
"ObjectPermissionSet",
"permSet",
")",
"throws",
"GuacamoleException",
"{",
"// Add all provided object permissions ",
... | Adds the object permissions from the given ObjectPermissionSet to the
Map of object permissions provided.
@param permissions
The Map to add object permissions to.
@param permSet
The ObjectPermissionSet containing the object permissions to add.
@throws GuacamoleException
If an error occurs while retrieving object per... | [
"Adds",
"the",
"object",
"permissions",
"from",
"the",
"given",
"ObjectPermissionSet",
"to",
"the",
"Map",
"of",
"object",
"permissions",
"provided",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/permission/APIPermissionSet.java#L131-L151 |
115,931 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/ListenerFactory.java | ListenerFactory.createListenerAdapters | @SuppressWarnings("deprecation")
private static List<Listener> createListenerAdapters(Object provider) {
final List<Listener> listeners = new ArrayList<Listener>();
if (provider instanceof AuthenticationSuccessListener) {
listeners.add(new AuthenticationSuccessListenerAdapter(
... | java | @SuppressWarnings("deprecation")
private static List<Listener> createListenerAdapters(Object provider) {
final List<Listener> listeners = new ArrayList<Listener>();
if (provider instanceof AuthenticationSuccessListener) {
listeners.add(new AuthenticationSuccessListenerAdapter(
... | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"private",
"static",
"List",
"<",
"Listener",
">",
"createListenerAdapters",
"(",
"Object",
"provider",
")",
"{",
"final",
"List",
"<",
"Listener",
">",
"listeners",
"=",
"new",
"ArrayList",
"<",
"Listener",
... | Creates a list of adapters for the given object, based on the legacy
listener interfaces it implements.
@param provider
An object that implements zero or more legacy listener interfaces.
@return
The list of listeners represented by the given provider class. | [
"Creates",
"a",
"list",
"of",
"adapters",
"for",
"the",
"given",
"object",
"based",
"on",
"the",
"legacy",
"listener",
"interfaces",
"it",
"implements",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/ListenerFactory.java#L75-L102 |
115,932 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/ConnectionSharingService.java | ConnectionSharingService.generateTemporaryCredentials | public UserCredentials generateTemporaryCredentials(ModeledAuthenticatedUser user,
ActiveConnectionRecord activeConnection,
String sharingProfileIdentifier) throws GuacamoleException {
// Pull sharing profile (verifying access)
ModeledSharingProfile sharingProfile =
... | java | public UserCredentials generateTemporaryCredentials(ModeledAuthenticatedUser user,
ActiveConnectionRecord activeConnection,
String sharingProfileIdentifier) throws GuacamoleException {
// Pull sharing profile (verifying access)
ModeledSharingProfile sharingProfile =
... | [
"public",
"UserCredentials",
"generateTemporaryCredentials",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"ActiveConnectionRecord",
"activeConnection",
",",
"String",
"sharingProfileIdentifier",
")",
"throws",
"GuacamoleException",
"{",
"// Pull sharing profile (verifying access)",
... | Generates a set of temporary credentials which can be used to connect to
the given connection using the given sharing profile. If the user does
not have permission to share the connection via the given sharing
profile, permission will be denied.
@param user
The user sharing the connection.
@param activeConnection
The... | [
"Generates",
"a",
"set",
"of",
"temporary",
"credentials",
"which",
"can",
"be",
"used",
"to",
"connect",
"to",
"the",
"given",
"connection",
"using",
"the",
"given",
"sharing",
"profile",
".",
"If",
"the",
"user",
"does",
"not",
"have",
"permission",
"to",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/ConnectionSharingService.java#L100-L128 |
115,933 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/ConnectionSharingService.java | ConnectionSharingService.getShareKey | public String getShareKey(Credentials credentials) {
// Pull associated HTTP request
HttpServletRequest request = credentials.getRequest();
if (request == null)
return null;
// Retrieve the share key from the request
return request.getParameter(SHARE_KEY_NAME);
... | java | public String getShareKey(Credentials credentials) {
// Pull associated HTTP request
HttpServletRequest request = credentials.getRequest();
if (request == null)
return null;
// Retrieve the share key from the request
return request.getParameter(SHARE_KEY_NAME);
... | [
"public",
"String",
"getShareKey",
"(",
"Credentials",
"credentials",
")",
"{",
"// Pull associated HTTP request",
"HttpServletRequest",
"request",
"=",
"credentials",
".",
"getRequest",
"(",
")",
";",
"if",
"(",
"request",
"==",
"null",
")",
"return",
"null",
";"... | Returns the share key contained within the given credentials. If there is
no such share key, null is returned.
@param credentials
The credentials from which the share key should be retrieved.
@return
The share key contained within the given credentials, or null if
the credentials do not contain a share key. | [
"Returns",
"the",
"share",
"key",
"contained",
"within",
"the",
"given",
"credentials",
".",
"If",
"there",
"is",
"no",
"such",
"share",
"key",
"null",
"is",
"returned",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/ConnectionSharingService.java#L141-L151 |
115,934 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/ConnectionSharingService.java | ConnectionSharingService.retrieveSharedConnectionUser | public SharedAuthenticatedUser retrieveSharedConnectionUser(
AuthenticationProvider authProvider, Credentials credentials) {
// Validate the share key
String shareKey = getShareKey(credentials);
if (shareKey == null || connectionMap.get(shareKey) == null)
return null;
... | java | public SharedAuthenticatedUser retrieveSharedConnectionUser(
AuthenticationProvider authProvider, Credentials credentials) {
// Validate the share key
String shareKey = getShareKey(credentials);
if (shareKey == null || connectionMap.get(shareKey) == null)
return null;
... | [
"public",
"SharedAuthenticatedUser",
"retrieveSharedConnectionUser",
"(",
"AuthenticationProvider",
"authProvider",
",",
"Credentials",
"credentials",
")",
"{",
"// Validate the share key",
"String",
"shareKey",
"=",
"getShareKey",
"(",
"credentials",
")",
";",
"if",
"(",
... | Returns a SharedAuthenticatedUser if the given credentials contain a
valid share key. The returned user will be associated with the single
shared connection to which they have been granted temporary access. If
the share key is invalid, or no share key is contained within the given
credentials, null is returned.
@param... | [
"Returns",
"a",
"SharedAuthenticatedUser",
"if",
"the",
"given",
"credentials",
"contain",
"a",
"valid",
"share",
"key",
".",
"The",
"returned",
"user",
"will",
"be",
"associated",
"with",
"the",
"single",
"shared",
"connection",
"to",
"which",
"they",
"have",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/ConnectionSharingService.java#L172-L183 |
115,935 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/token/TokenFilter.java | TokenFilter.setTokens | public void setTokens(Map<String, String> tokens) {
tokenValues.clear();
tokenValues.putAll(tokens);
} | java | public void setTokens(Map<String, String> tokens) {
tokenValues.clear();
tokenValues.putAll(tokens);
} | [
"public",
"void",
"setTokens",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"tokens",
")",
"{",
"tokenValues",
".",
"clear",
"(",
")",
";",
"tokenValues",
".",
"putAll",
"(",
"tokens",
")",
";",
"}"
] | Replaces all current token values with the contents of the given map,
where each map key represents a token name, and each map value
represents a token value.
@param tokens
A map containing the token names and corresponding values to
assign. | [
"Replaces",
"all",
"current",
"token",
"values",
"with",
"the",
"contents",
"of",
"the",
"given",
"map",
"where",
"each",
"map",
"key",
"represents",
"a",
"token",
"name",
"and",
"each",
"map",
"value",
"represents",
"a",
"token",
"value",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/token/TokenFilter.java#L155-L158 |
115,936 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/token/TokenFilter.java | TokenFilter.filter | public String filter(String input) {
StringBuilder output = new StringBuilder();
Matcher tokenMatcher = tokenPattern.matcher(input);
// Track last regex match
int endOfLastMatch = 0;
// For each possible token
while (tokenMatcher.find()) {
// Pull possible... | java | public String filter(String input) {
StringBuilder output = new StringBuilder();
Matcher tokenMatcher = tokenPattern.matcher(input);
// Track last regex match
int endOfLastMatch = 0;
// For each possible token
while (tokenMatcher.find()) {
// Pull possible... | [
"public",
"String",
"filter",
"(",
"String",
"input",
")",
"{",
"StringBuilder",
"output",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Matcher",
"tokenMatcher",
"=",
"tokenPattern",
".",
"matcher",
"(",
"input",
")",
";",
"// Track last regex match",
"int",
"... | Filters the given string, replacing any tokens with their corresponding
values.
@param input
The string to filter.
@return
A copy of the input string, with any tokens replaced with their
corresponding values. | [
"Filters",
"the",
"given",
"string",
"replacing",
"any",
"tokens",
"with",
"their",
"corresponding",
"values",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/token/TokenFilter.java#L171-L227 |
115,937 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/token/TokenFilter.java | TokenFilter.filterValues | public void filterValues(Map<?, String> map) {
// For each map entry
for (Map.Entry<?, String> entry : map.entrySet()) {
// If value is non-null, filter value through this TokenFilter
String value = entry.getValue();
if (value != null)
entry.setValue... | java | public void filterValues(Map<?, String> map) {
// For each map entry
for (Map.Entry<?, String> entry : map.entrySet()) {
// If value is non-null, filter value through this TokenFilter
String value = entry.getValue();
if (value != null)
entry.setValue... | [
"public",
"void",
"filterValues",
"(",
"Map",
"<",
"?",
",",
"String",
">",
"map",
")",
"{",
"// For each map entry",
"for",
"(",
"Map",
".",
"Entry",
"<",
"?",
",",
"String",
">",
"entry",
":",
"map",
".",
"entrySet",
"(",
")",
")",
"{",
"// If valu... | Given an arbitrary map containing String values, replace each non-null
value with the corresponding filtered value.
@param map
The map whose values should be filtered. | [
"Given",
"an",
"arbitrary",
"map",
"containing",
"String",
"values",
"replace",
"each",
"non",
"-",
"null",
"value",
"with",
"the",
"corresponding",
"filtered",
"value",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/token/TokenFilter.java#L236-L248 |
115,938 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java | LanguageResourceService.getLanguageKey | public String getLanguageKey(String path) {
// Parse language key from filename
Matcher languageKeyMatcher = LANGUAGE_KEY_PATTERN.matcher(path);
if (!languageKeyMatcher.matches())
return null;
// Return parsed key
return languageKeyMatcher.group(1);
} | java | public String getLanguageKey(String path) {
// Parse language key from filename
Matcher languageKeyMatcher = LANGUAGE_KEY_PATTERN.matcher(path);
if (!languageKeyMatcher.matches())
return null;
// Return parsed key
return languageKeyMatcher.group(1);
} | [
"public",
"String",
"getLanguageKey",
"(",
"String",
"path",
")",
"{",
"// Parse language key from filename",
"Matcher",
"languageKeyMatcher",
"=",
"LANGUAGE_KEY_PATTERN",
".",
"matcher",
"(",
"path",
")",
";",
"if",
"(",
"!",
"languageKeyMatcher",
".",
"matches",
"... | Derives a language key from the filename within the given path, if
possible. If the filename is not a valid language key, null is returned.
@param path
The path containing the filename to derive the language key from.
@return
The derived language key, or null if the filename is not a valid
language key. | [
"Derives",
"a",
"language",
"key",
"from",
"the",
"filename",
"within",
"the",
"given",
"path",
"if",
"possible",
".",
"If",
"the",
"filename",
"is",
"not",
"a",
"valid",
"language",
"key",
"null",
"is",
"returned",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java#L147-L157 |
115,939 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java | LanguageResourceService.mergeTranslations | private JsonNode mergeTranslations(JsonNode original, JsonNode overlay) {
// If we are at a leaf node, the result of merging is simply the overlay
if (!overlay.isObject() || original == null)
return overlay;
// Create mutable copy of original
ObjectNode newNode = JsonNodeFa... | java | private JsonNode mergeTranslations(JsonNode original, JsonNode overlay) {
// If we are at a leaf node, the result of merging is simply the overlay
if (!overlay.isObject() || original == null)
return overlay;
// Create mutable copy of original
ObjectNode newNode = JsonNodeFa... | [
"private",
"JsonNode",
"mergeTranslations",
"(",
"JsonNode",
"original",
",",
"JsonNode",
"overlay",
")",
"{",
"// If we are at a leaf node, the result of merging is simply the overlay",
"if",
"(",
"!",
"overlay",
".",
"isObject",
"(",
")",
"||",
"original",
"==",
"null... | Merges the given JSON objects. Any leaf node in overlay will overwrite
the corresponding path in original.
@param original
The original JSON object to which changes should be applied.
@param overlay
The JSON object containing changes that should be applied.
@return
The newly constructed JSON object that is the resul... | [
"Merges",
"the",
"given",
"JSON",
"objects",
".",
"Any",
"leaf",
"node",
"in",
"overlay",
"will",
"overwrite",
"the",
"corresponding",
"path",
"in",
"original",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java#L173-L196 |
115,940 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java | LanguageResourceService.parseLanguageResource | private JsonNode parseLanguageResource(Resource resource) throws IOException {
// Get resource stream
InputStream stream = resource.asStream();
if (stream == null)
return null;
// Parse JSON tree
try {
JsonNode tree = mapper.readTree(stream);
... | java | private JsonNode parseLanguageResource(Resource resource) throws IOException {
// Get resource stream
InputStream stream = resource.asStream();
if (stream == null)
return null;
// Parse JSON tree
try {
JsonNode tree = mapper.readTree(stream);
... | [
"private",
"JsonNode",
"parseLanguageResource",
"(",
"Resource",
"resource",
")",
"throws",
"IOException",
"{",
"// Get resource stream",
"InputStream",
"stream",
"=",
"resource",
".",
"asStream",
"(",
")",
";",
"if",
"(",
"stream",
"==",
"null",
")",
"return",
... | Parses the given language resource, returning the resulting JsonNode.
If the resource cannot be read because it does not exist, null is
returned.
@param resource
The language resource to parse. Language resources must have the
mimetype "application/json".
@return
A JsonNode representing the root of the parsed JSON tr... | [
"Parses",
"the",
"given",
"language",
"resource",
"returning",
"the",
"resulting",
"JsonNode",
".",
"If",
"the",
"resource",
"cannot",
"be",
"read",
"because",
"it",
"does",
"not",
"exist",
"null",
"is",
"returned",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java#L214-L232 |
115,941 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java | LanguageResourceService.addLanguageResource | public void addLanguageResource(String key, Resource resource) {
// Skip loading of language if not allowed
if (!isLanguageAllowed(key)) {
logger.debug("OMITTING language: \"{}\"", key);
return;
}
// Merge language resources if already defined
Resource e... | java | public void addLanguageResource(String key, Resource resource) {
// Skip loading of language if not allowed
if (!isLanguageAllowed(key)) {
logger.debug("OMITTING language: \"{}\"", key);
return;
}
// Merge language resources if already defined
Resource e... | [
"public",
"void",
"addLanguageResource",
"(",
"String",
"key",
",",
"Resource",
"resource",
")",
"{",
"// Skip loading of language if not allowed",
"if",
"(",
"!",
"isLanguageAllowed",
"(",
"key",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"OMITTING language: \\\... | Adds or overlays the given language resource, which need not exist in
the ServletContext. If a language resource is already defined for the
given language key, the strings from the given resource will be overlaid
on top of the existing strings, augmenting or overriding the available
strings for that language.
@param k... | [
"Adds",
"or",
"overlays",
"the",
"given",
"language",
"resource",
"which",
"need",
"not",
"exist",
"in",
"the",
"ServletContext",
".",
"If",
"a",
"language",
"resource",
"is",
"already",
"defined",
"for",
"the",
"given",
"language",
"key",
"the",
"strings",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java#L275-L323 |
115,942 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java | RestrictedGuacamoleTunnelService.tryAdd | private <T> boolean tryAdd(ConcurrentHashMultiset<T> multiset, T value, int max) {
// Repeatedly attempt to add a new value to the given multiset until we
// explicitly succeed or explicitly fail
while (true) {
// Get current number of values
int count = multiset.count(... | java | private <T> boolean tryAdd(ConcurrentHashMultiset<T> multiset, T value, int max) {
// Repeatedly attempt to add a new value to the given multiset until we
// explicitly succeed or explicitly fail
while (true) {
// Get current number of values
int count = multiset.count(... | [
"private",
"<",
"T",
">",
"boolean",
"tryAdd",
"(",
"ConcurrentHashMultiset",
"<",
"T",
">",
"multiset",
",",
"T",
"value",
",",
"int",
"max",
")",
"{",
"// Repeatedly attempt to add a new value to the given multiset until we",
"// explicitly succeed or explicitly fail",
... | Attempts to add a single instance of the given value to the given
multiset without exceeding the specified maximum number of values. If
the value cannot be added without exceeding the maximum, false is
returned.
@param <T>
The type of values contained within the multiset.
@param multiset
The multiset to attempt to ad... | [
"Attempts",
"to",
"add",
"a",
"single",
"instance",
"of",
"the",
"given",
"value",
"to",
"the",
"given",
"multiset",
"without",
"exceeding",
"the",
"specified",
"maximum",
"number",
"of",
"values",
".",
"If",
"the",
"value",
"cannot",
"be",
"added",
"without... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java#L109-L130 |
115,943 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java | RestrictedGuacamoleTunnelService.tryIncrement | private boolean tryIncrement(AtomicInteger counter, int max) {
// Repeatedly attempt to increment the given AtomicInteger until we
// explicitly succeed or explicitly fail
while (true) {
// Get current value
int count = counter.get();
// Bail out if the max... | java | private boolean tryIncrement(AtomicInteger counter, int max) {
// Repeatedly attempt to increment the given AtomicInteger until we
// explicitly succeed or explicitly fail
while (true) {
// Get current value
int count = counter.get();
// Bail out if the max... | [
"private",
"boolean",
"tryIncrement",
"(",
"AtomicInteger",
"counter",
",",
"int",
"max",
")",
"{",
"// Repeatedly attempt to increment the given AtomicInteger until we",
"// explicitly succeed or explicitly fail",
"while",
"(",
"true",
")",
"{",
"// Get current value",
"int",
... | Attempts to increment the given AtomicInteger without exceeding the
specified maximum value. If the AtomicInteger cannot be incremented
without exceeding the maximum, false is returned.
@param counter
The AtomicInteger to attempt to increment.
@param max
The maximum value that the given AtomicInteger should contain, ... | [
"Attempts",
"to",
"increment",
"the",
"given",
"AtomicInteger",
"without",
"exceeding",
"the",
"specified",
"maximum",
"value",
".",
"If",
"the",
"AtomicInteger",
"cannot",
"be",
"incremented",
"without",
"exceeding",
"the",
"maximum",
"false",
"is",
"returned",
"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java#L149-L170 |
115,944 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/DirectoryClassLoader.java | DirectoryClassLoader.getInstance | public static DirectoryClassLoader getInstance(final File dir)
throws GuacamoleException {
try {
// Attempt to create singleton classloader which loads classes from
// all .jar's in the lib directory defined in guacamole.properties
return AccessController.doPrivi... | java | public static DirectoryClassLoader getInstance(final File dir)
throws GuacamoleException {
try {
// Attempt to create singleton classloader which loads classes from
// all .jar's in the lib directory defined in guacamole.properties
return AccessController.doPrivi... | [
"public",
"static",
"DirectoryClassLoader",
"getInstance",
"(",
"final",
"File",
"dir",
")",
"throws",
"GuacamoleException",
"{",
"try",
"{",
"// Attempt to create singleton classloader which loads classes from",
"// all .jar's in the lib directory defined in guacamole.properties",
"... | Returns an instance of DirectoryClassLoader configured to load .jar
files from the given directory. Calling this function multiple times
will not affect previously-returned instances of DirectoryClassLoader.
@param dir
The directory from which .jar files should be read.
@return
A DirectoryClassLoader instance which l... | [
"Returns",
"an",
"instance",
"of",
"DirectoryClassLoader",
"configured",
"to",
"load",
".",
"jar",
"files",
"from",
"the",
"given",
"directory",
".",
"Calling",
"this",
"function",
"multiple",
"times",
"will",
"not",
"affect",
"previously",
"-",
"returned",
"ins... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/DirectoryClassLoader.java#L56-L76 |
115,945 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/DirectoryClassLoader.java | DirectoryClassLoader.getJarURLs | private static URL[] getJarURLs(File dir) throws GuacamoleException {
// Validate directory is indeed a directory
if (!dir.isDirectory())
throw new GuacamoleException(dir + " is not a directory.");
// Get list of URLs for all .jar's in the lib directory
Collection<URL> jarU... | java | private static URL[] getJarURLs(File dir) throws GuacamoleException {
// Validate directory is indeed a directory
if (!dir.isDirectory())
throw new GuacamoleException(dir + " is not a directory.");
// Get list of URLs for all .jar's in the lib directory
Collection<URL> jarU... | [
"private",
"static",
"URL",
"[",
"]",
"getJarURLs",
"(",
"File",
"dir",
")",
"throws",
"GuacamoleException",
"{",
"// Validate directory is indeed a directory",
"if",
"(",
"!",
"dir",
".",
"isDirectory",
"(",
")",
")",
"throw",
"new",
"GuacamoleException",
"(",
... | Returns all .jar files within the given directory as an array of URLs.
@param dir
The directory to retrieve all .jar files from.
@return
An array of the URLs of all .jar files within the given directory.
@throws GuacamoleException
If the given file is not a directory, or the contents of the given
directory cannot be... | [
"Returns",
"all",
".",
"jar",
"files",
"within",
"the",
"given",
"directory",
"as",
"an",
"array",
"of",
"URLs",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/DirectoryClassLoader.java#L91-L131 |
115,946 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java | AuthenticationProviderFacade.warnAuthProviderSkipped | private void warnAuthProviderSkipped(Throwable e) {
logger.warn("The \"{}\" authentication provider has been skipped due "
+ "to an internal error. If this is unexpected or you are the "
+ "developer of this authentication provider, you may wish to "
+ "enable de... | java | private void warnAuthProviderSkipped(Throwable e) {
logger.warn("The \"{}\" authentication provider has been skipped due "
+ "to an internal error. If this is unexpected or you are the "
+ "developer of this authentication provider, you may wish to "
+ "enable de... | [
"private",
"void",
"warnAuthProviderSkipped",
"(",
"Throwable",
"e",
")",
"{",
"logger",
".",
"warn",
"(",
"\"The \\\"{}\\\" authentication provider has been skipped due \"",
"+",
"\"to an internal error. If this is unexpected or you are the \"",
"+",
"\"developer of this authenticat... | Logs a warning that this authentication provider is being skipped due to
an internal error. If debug-level logging is enabled, the full details
of the internal error are also logged.
@param e
The internal error that occurred which has resulted in this
authentication provider being skipped. | [
"Logs",
"a",
"warning",
"that",
"this",
"authentication",
"provider",
"is",
"being",
"skipped",
"due",
"to",
"an",
"internal",
"error",
".",
"If",
"debug",
"-",
"level",
"logging",
"is",
"enabled",
"the",
"full",
"details",
"of",
"the",
"internal",
"error",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java#L145-L155 |
115,947 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java | AuthenticationProviderFacade.warnAuthAborted | private void warnAuthAborted() {
String identifier = getIdentifier();
logger.warn("The \"{}\" authentication provider has encountered an "
+ "internal error which will halt the authentication "
+ "process. If this is unexpected or you are the developer of "
... | java | private void warnAuthAborted() {
String identifier = getIdentifier();
logger.warn("The \"{}\" authentication provider has encountered an "
+ "internal error which will halt the authentication "
+ "process. If this is unexpected or you are the developer of "
... | [
"private",
"void",
"warnAuthAborted",
"(",
")",
"{",
"String",
"identifier",
"=",
"getIdentifier",
"(",
")",
";",
"logger",
".",
"warn",
"(",
"\"The \\\"{}\\\" authentication provider has encountered an \"",
"+",
"\"internal error which will halt the authentication \"",
"+",
... | Logs a warning that the authentication process will be entirely aborted
due to an internal error, advising the administrator to set the
"skip-if-unavailable" property if error encountered is expected and
should be tolerated. | [
"Logs",
"a",
"warning",
"that",
"the",
"authentication",
"process",
"will",
"be",
"entirely",
"aborted",
"due",
"to",
"an",
"internal",
"error",
"advising",
"the",
"administrator",
"to",
"set",
"the",
"skip",
"-",
"if",
"-",
"unavailable",
"property",
"if",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java#L163-L174 |
115,948 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java | ModeledConnection.getMaxConnections | public int getMaxConnections() throws GuacamoleException {
// Pull default from environment if connection limit is unset
Integer value = getModel().getMaxConnections();
if (value == null)
return environment.getDefaultMaxConnections();
// Otherwise use defined value
... | java | public int getMaxConnections() throws GuacamoleException {
// Pull default from environment if connection limit is unset
Integer value = getModel().getMaxConnections();
if (value == null)
return environment.getDefaultMaxConnections();
// Otherwise use defined value
... | [
"public",
"int",
"getMaxConnections",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Pull default from environment if connection limit is unset",
"Integer",
"value",
"=",
"getModel",
"(",
")",
".",
"getMaxConnections",
"(",
")",
";",
"if",
"(",
"value",
"==",
"nul... | Returns the maximum number of connections that should be allowed to this
connection overall. If no limit applies, zero is returned.
@return
The maximum number of connections that should be allowed to this
connection overall, or zero if no limit applies.
@throws GuacamoleException
If an error occurs while parsing the ... | [
"Returns",
"the",
"maximum",
"number",
"of",
"connections",
"that",
"should",
"be",
"allowed",
"to",
"this",
"connection",
"overall",
".",
"If",
"no",
"limit",
"applies",
"zero",
"is",
"returned",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java#L396-L406 |
115,949 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java | ModeledConnection.getMaxConnectionsPerUser | public int getMaxConnectionsPerUser() throws GuacamoleException {
// Pull default from environment if per-user connection limit is unset
Integer value = getModel().getMaxConnectionsPerUser();
if (value == null)
return environment.getDefaultMaxConnectionsPerUser();
// Otherw... | java | public int getMaxConnectionsPerUser() throws GuacamoleException {
// Pull default from environment if per-user connection limit is unset
Integer value = getModel().getMaxConnectionsPerUser();
if (value == null)
return environment.getDefaultMaxConnectionsPerUser();
// Otherw... | [
"public",
"int",
"getMaxConnectionsPerUser",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Pull default from environment if per-user connection limit is unset",
"Integer",
"value",
"=",
"getModel",
"(",
")",
".",
"getMaxConnectionsPerUser",
"(",
")",
";",
"if",
"(",
... | Returns the maximum number of connections that should be allowed to this
connection for any individual user. If no limit applies, zero is
returned.
@return
The maximum number of connections that should be allowed to this
connection for any individual user, or zero if no limit applies.
@throws GuacamoleException
If an... | [
"Returns",
"the",
"maximum",
"number",
"of",
"connections",
"that",
"should",
"be",
"allowed",
"to",
"this",
"connection",
"for",
"any",
"individual",
"user",
".",
"If",
"no",
"limit",
"applies",
"zero",
"is",
"returned",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java#L421-L431 |
115,950 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java | ModeledConnection.getGuacamoleProxyConfiguration | public GuacamoleProxyConfiguration getGuacamoleProxyConfiguration()
throws GuacamoleException {
// Retrieve default proxy configuration from environment
GuacamoleProxyConfiguration defaultConfig = environment.getDefaultGuacamoleProxyConfiguration();
// Retrieve proxy configuration ... | java | public GuacamoleProxyConfiguration getGuacamoleProxyConfiguration()
throws GuacamoleException {
// Retrieve default proxy configuration from environment
GuacamoleProxyConfiguration defaultConfig = environment.getDefaultGuacamoleProxyConfiguration();
// Retrieve proxy configuration ... | [
"public",
"GuacamoleProxyConfiguration",
"getGuacamoleProxyConfiguration",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Retrieve default proxy configuration from environment",
"GuacamoleProxyConfiguration",
"defaultConfig",
"=",
"environment",
".",
"getDefaultGuacamoleProxyConfigur... | Returns the connection information which should be used to connect to
guacd when establishing a connection to the remote desktop described by
this connection. If no such information is defined for this specific
remote desktop connection, the default guacd connection information will
be used instead, as defined by JDBCE... | [
"Returns",
"the",
"connection",
"information",
"which",
"should",
"be",
"used",
"to",
"connect",
"to",
"guacd",
"when",
"establishing",
"a",
"connection",
"to",
"the",
"remote",
"desktop",
"described",
"by",
"this",
"connection",
".",
"If",
"no",
"such",
"info... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java#L448-L465 |
115,951 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/event/ListenerService.java | ListenerService.handleEvent | @Override
public void handleEvent(Object event) throws GuacamoleException {
for (final Listener listener : listeners) {
listener.handleEvent(event);
}
} | java | @Override
public void handleEvent(Object event) throws GuacamoleException {
for (final Listener listener : listeners) {
listener.handleEvent(event);
}
} | [
"@",
"Override",
"public",
"void",
"handleEvent",
"(",
"Object",
"event",
")",
"throws",
"GuacamoleException",
"{",
"for",
"(",
"final",
"Listener",
"listener",
":",
"listeners",
")",
"{",
"listener",
".",
"handleEvent",
"(",
"event",
")",
";",
"}",
"}"
] | Notifies registered listeners than an event has occurred. Notification continues
until a given listener throws a GuacamoleException or other runtime exception, or
until all listeners have been notified.
@param event
An object that describes the event that has occurred.
@throws GuacamoleException
If a registered liste... | [
"Notifies",
"registered",
"listeners",
"than",
"an",
"event",
"has",
"occurred",
".",
"Notification",
"continues",
"until",
"a",
"given",
"listener",
"throws",
"a",
"GuacamoleException",
"or",
"other",
"runtime",
"exception",
"or",
"until",
"all",
"listeners",
"ha... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/event/ListenerService.java#L50-L55 |
115,952 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/environment/LocalEnvironment.java | LocalEnvironment.readProtocols | private Map<String, ProtocolInfo> readProtocols() {
// Map of all available protocols
Map<String, ProtocolInfo> protocols = new HashMap<String, ProtocolInfo>();
// Get protcols directory
File protocol_directory = new File(getGuacamoleHome(), "protocols");
// Read protocols fro... | java | private Map<String, ProtocolInfo> readProtocols() {
// Map of all available protocols
Map<String, ProtocolInfo> protocols = new HashMap<String, ProtocolInfo>();
// Get protcols directory
File protocol_directory = new File(getGuacamoleHome(), "protocols");
// Read protocols fro... | [
"private",
"Map",
"<",
"String",
",",
"ProtocolInfo",
">",
"readProtocols",
"(",
")",
"{",
"// Map of all available protocols",
"Map",
"<",
"String",
",",
"ProtocolInfo",
">",
"protocols",
"=",
"new",
"HashMap",
"<",
"String",
",",
"ProtocolInfo",
">",
"(",
")... | Reads through all pre-defined protocols and any protocols within the
"protocols" subdirectory of GUACAMOLE_HOME, returning a map containing
each of these protocols. The key of each entry will be the name of that
protocol, as would be passed to guacd during connection.
@return
A map of all available protocols. | [
"Reads",
"through",
"all",
"pre",
"-",
"defined",
"protocols",
"and",
"any",
"protocols",
"within",
"the",
"protocols",
"subdirectory",
"of",
"GUACAMOLE_HOME",
"returning",
"a",
"map",
"containing",
"each",
"of",
"these",
"protocols",
".",
"The",
"key",
"of",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/environment/LocalEnvironment.java#L240-L320 |
115,953 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/environment/LocalEnvironment.java | LocalEnvironment.getPropertyValue | private String getPropertyValue(String name) {
// Check for corresponding environment variable if overrides enabled
if (environmentPropertiesEnabled) {
// Transform the name according to common convention
final String envName = name.replace('-', '_').toUpperCase();
... | java | private String getPropertyValue(String name) {
// Check for corresponding environment variable if overrides enabled
if (environmentPropertiesEnabled) {
// Transform the name according to common convention
final String envName = name.replace('-', '_').toUpperCase();
... | [
"private",
"String",
"getPropertyValue",
"(",
"String",
"name",
")",
"{",
"// Check for corresponding environment variable if overrides enabled",
"if",
"(",
"environmentPropertiesEnabled",
")",
"{",
"// Transform the name according to common convention",
"final",
"String",
"envName... | Gets the string value for a property name.
The value may come from either the OS environment (if property override
is enabled) or the Properties collection that was loaded from
guacamole.properties. When checking the environment for the named
property, the name is first transformed by converting all hyphens to
undersc... | [
"Gets",
"the",
"string",
"value",
"for",
"a",
"property",
"name",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/environment/LocalEnvironment.java#L370-L385 |
115,954 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/TokenRESTService.java | TokenRESTService.getCredentials | private Credentials getCredentials(HttpServletRequest request,
String username, String password) {
// If no username/password given, try Authorization header
if (username == null && password == null) {
String authorization = request.getHeader("Authorization");
if (a... | java | private Credentials getCredentials(HttpServletRequest request,
String username, String password) {
// If no username/password given, try Authorization header
if (username == null && password == null) {
String authorization = request.getHeader("Authorization");
if (a... | [
"private",
"Credentials",
"getCredentials",
"(",
"HttpServletRequest",
"request",
",",
"String",
"username",
",",
"String",
"password",
")",
"{",
"// If no username/password given, try Authorization header",
"if",
"(",
"username",
"==",
"null",
"&&",
"password",
"==",
"... | Returns the credentials associated with the given request, using the
provided username and password.
@param request
The request to use to derive the credentials.
@param username
The username to associate with the credentials, or null if the
username should be derived from the request.
@param password
The password to... | [
"Returns",
"the",
"credentials",
"associated",
"with",
"the",
"given",
"request",
"using",
"the",
"provided",
"username",
"and",
"password",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/TokenRESTService.java#L84-L123 |
115,955 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/TokenRESTService.java | TokenRESTService.invalidateToken | @DELETE
@Path("/{token}")
public void invalidateToken(@PathParam("token") String authToken)
throws GuacamoleException {
// Invalidate session, if it exists
if (!authenticationService.destroyGuacamoleSession(authToken))
throw new GuacamoleResourceNotFoundException("No suc... | java | @DELETE
@Path("/{token}")
public void invalidateToken(@PathParam("token") String authToken)
throws GuacamoleException {
// Invalidate session, if it exists
if (!authenticationService.destroyGuacamoleSession(authToken))
throw new GuacamoleResourceNotFoundException("No suc... | [
"@",
"DELETE",
"@",
"Path",
"(",
"\"/{token}\"",
")",
"public",
"void",
"invalidateToken",
"(",
"@",
"PathParam",
"(",
"\"token\"",
")",
"String",
"authToken",
")",
"throws",
"GuacamoleException",
"{",
"// Invalidate session, if it exists",
"if",
"(",
"!",
"authen... | Invalidates a specific auth token, effectively logging out the associated
user.
@param authToken
The token being invalidated.
@throws GuacamoleException
If the specified token does not exist. | [
"Invalidates",
"a",
"specific",
"auth",
"token",
"effectively",
"logging",
"out",
"the",
"associated",
"user",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/TokenRESTService.java#L208-L217 |
115,956 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ActivityRecordSearchTerm.java | ActivityRecordSearchTerm.parseInt | private static int parseInt(String str, int defaultValue) {
if (str == null)
return defaultValue;
return Integer.parseInt(str);
} | java | private static int parseInt(String str, int defaultValue) {
if (str == null)
return defaultValue;
return Integer.parseInt(str);
} | [
"private",
"static",
"int",
"parseInt",
"(",
"String",
"str",
",",
"int",
"defaultValue",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"return",
"defaultValue",
";",
"return",
"Integer",
".",
"parseInt",
"(",
"str",
")",
";",
"}"
] | Parse the given string as an integer, returning the provided default
value if the string is null.
@param str
The string to parse as an integer.
@param defaultValue
The value to return if <code>str</code> is null.
@return
The parsed value, or the provided default value if <code>str</code>
is null. | [
"Parse",
"the",
"given",
"string",
"as",
"an",
"integer",
"returning",
"the",
"provided",
"default",
"value",
"if",
"the",
"string",
"is",
"null",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ActivityRecordSearchTerm.java#L90-L97 |
115,957 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connectiongroup/ConnectionGroupService.java | ConnectionGroupService.getIdentifiersWithin | public Set<String> getIdentifiersWithin(ModeledAuthenticatedUser user,
String identifier)
throws GuacamoleException {
// Bypass permission checks if the user is a system admin
if (user.getUser().isAdministrator())
return connectionGroupMapper.selectIdentifiersWithin(... | java | public Set<String> getIdentifiersWithin(ModeledAuthenticatedUser user,
String identifier)
throws GuacamoleException {
// Bypass permission checks if the user is a system admin
if (user.getUser().isAdministrator())
return connectionGroupMapper.selectIdentifiersWithin(... | [
"public",
"Set",
"<",
"String",
">",
"getIdentifiersWithin",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"String",
"identifier",
")",
"throws",
"GuacamoleException",
"{",
"// Bypass permission checks if the user is a system admin",
"if",
"(",
"user",
".",
"getUser",
"("... | Returns the set of all identifiers for all connection groups within the
connection group having the given identifier. Only connection groups
that the user has read access to will be returned.
Permission to read the connection group having the given identifier is
NOT checked.
@param user
The user retrieving the identi... | [
"Returns",
"the",
"set",
"of",
"all",
"identifiers",
"for",
"all",
"connection",
"groups",
"within",
"the",
"connection",
"group",
"having",
"the",
"given",
"identifier",
".",
"Only",
"connection",
"groups",
"that",
"the",
"user",
"has",
"read",
"access",
"to"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connectiongroup/ConnectionGroupService.java#L217-L231 |
115,958 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java | TunnelRequestService.fireTunnelConnectEvent | private void fireTunnelConnectEvent(AuthenticatedUser authenticatedUser,
Credentials credentials, GuacamoleTunnel tunnel) throws GuacamoleException {
listenerService.handleEvent(new TunnelConnectEvent(authenticatedUser,
credentials, tunnel));
} | java | private void fireTunnelConnectEvent(AuthenticatedUser authenticatedUser,
Credentials credentials, GuacamoleTunnel tunnel) throws GuacamoleException {
listenerService.handleEvent(new TunnelConnectEvent(authenticatedUser,
credentials, tunnel));
} | [
"private",
"void",
"fireTunnelConnectEvent",
"(",
"AuthenticatedUser",
"authenticatedUser",
",",
"Credentials",
"credentials",
",",
"GuacamoleTunnel",
"tunnel",
")",
"throws",
"GuacamoleException",
"{",
"listenerService",
".",
"handleEvent",
"(",
"new",
"TunnelConnectEvent"... | Notifies bound listeners that a new tunnel has been connected.
Listeners may veto a connected tunnel by throwing any GuacamoleException.
@param authenticatedUser
The AuthenticatedUser associated with the user for whom the tunnel
is being created.
@param credentials
Credentials that authenticate the user.
@param tunn... | [
"Notifies",
"bound",
"listeners",
"that",
"a",
"new",
"tunnel",
"has",
"been",
"connected",
".",
"Listeners",
"may",
"veto",
"a",
"connected",
"tunnel",
"by",
"throwing",
"any",
"GuacamoleException",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java#L89-L93 |
115,959 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java | TunnelRequestService.fireTunnelClosedEvent | private void fireTunnelClosedEvent(AuthenticatedUser authenticatedUser,
Credentials credentials, GuacamoleTunnel tunnel)
throws GuacamoleException {
listenerService.handleEvent(new TunnelCloseEvent(authenticatedUser,
credentials, tunnel));
} | java | private void fireTunnelClosedEvent(AuthenticatedUser authenticatedUser,
Credentials credentials, GuacamoleTunnel tunnel)
throws GuacamoleException {
listenerService.handleEvent(new TunnelCloseEvent(authenticatedUser,
credentials, tunnel));
} | [
"private",
"void",
"fireTunnelClosedEvent",
"(",
"AuthenticatedUser",
"authenticatedUser",
",",
"Credentials",
"credentials",
",",
"GuacamoleTunnel",
"tunnel",
")",
"throws",
"GuacamoleException",
"{",
"listenerService",
".",
"handleEvent",
"(",
"new",
"TunnelCloseEvent",
... | Notifies bound listeners that a tunnel is to be closed.
Listeners are allowed to veto a request to close a tunnel by throwing any
GuacamoleException.
@param authenticatedUser
The AuthenticatedUser associated with the user for whom the tunnel
is being closed.
@param credentials
Credentials that authenticate the user.
... | [
"Notifies",
"bound",
"listeners",
"that",
"a",
"tunnel",
"is",
"to",
"be",
"closed",
".",
"Listeners",
"are",
"allowed",
"to",
"veto",
"a",
"request",
"to",
"close",
"a",
"tunnel",
"by",
"throwing",
"any",
"GuacamoleException",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java#L113-L118 |
115,960 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java | TunnelRequestService.getClientInformation | protected GuacamoleClientInformation getClientInformation(TunnelRequest request)
throws GuacamoleException {
// Get client information
GuacamoleClientInformation info = new GuacamoleClientInformation();
// Set width if provided
Integer width = request.getWidth();
if (wi... | java | protected GuacamoleClientInformation getClientInformation(TunnelRequest request)
throws GuacamoleException {
// Get client information
GuacamoleClientInformation info = new GuacamoleClientInformation();
// Set width if provided
Integer width = request.getWidth();
if (wi... | [
"protected",
"GuacamoleClientInformation",
"getClientInformation",
"(",
"TunnelRequest",
"request",
")",
"throws",
"GuacamoleException",
"{",
"// Get client information",
"GuacamoleClientInformation",
"info",
"=",
"new",
"GuacamoleClientInformation",
"(",
")",
";",
"// Set widt... | Reads and returns the client information provided within the given
request.
@param request
The request describing tunnel to create.
@return GuacamoleClientInformation
An object containing information about the client sending the tunnel
request.
@throws GuacamoleException
If the parameters of the tunnel request are i... | [
"Reads",
"and",
"returns",
"the",
"client",
"information",
"provided",
"within",
"the",
"given",
"request",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java#L134-L171 |
115,961 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java | TunnelRequestService.createAssociatedTunnel | protected GuacamoleTunnel createAssociatedTunnel(final GuacamoleTunnel tunnel,
final String authToken, final GuacamoleSession session,
final UserContext context, final TunnelRequest.Type type,
final String id) throws GuacamoleException {
// Monitor tunnel closure and data
... | java | protected GuacamoleTunnel createAssociatedTunnel(final GuacamoleTunnel tunnel,
final String authToken, final GuacamoleSession session,
final UserContext context, final TunnelRequest.Type type,
final String id) throws GuacamoleException {
// Monitor tunnel closure and data
... | [
"protected",
"GuacamoleTunnel",
"createAssociatedTunnel",
"(",
"final",
"GuacamoleTunnel",
"tunnel",
",",
"final",
"String",
"authToken",
",",
"final",
"GuacamoleSession",
"session",
",",
"final",
"UserContext",
"context",
",",
"final",
"TunnelRequest",
".",
"Type",
"... | Associates the given tunnel with the given session, returning a wrapped
version of the same tunnel which automatically handles closure and
removal from the session.
@param tunnel
The connected tunnel to wrap and monitor.
@param authToken
The authentication token associated with the given session. If
provided, this to... | [
"Associates",
"the",
"given",
"tunnel",
"with",
"the",
"given",
"session",
"returning",
"a",
"wrapped",
"version",
"of",
"the",
"same",
"tunnel",
"which",
"automatically",
"handles",
"closure",
"and",
"removal",
"from",
"the",
"session",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java#L293-L367 |
115,962 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java | TunnelRequestService.createTunnel | public GuacamoleTunnel createTunnel(TunnelRequest request)
throws GuacamoleException {
// Parse request parameters
String authToken = request.getAuthenticationToken();
String id = request.getIdentifier();
TunnelRequest.Type type =... | java | public GuacamoleTunnel createTunnel(TunnelRequest request)
throws GuacamoleException {
// Parse request parameters
String authToken = request.getAuthenticationToken();
String id = request.getIdentifier();
TunnelRequest.Type type =... | [
"public",
"GuacamoleTunnel",
"createTunnel",
"(",
"TunnelRequest",
"request",
")",
"throws",
"GuacamoleException",
"{",
"// Parse request parameters",
"String",
"authToken",
"=",
"request",
".",
"getAuthenticationToken",
"(",
")",
";",
"String",
"id",
"=",
"request",
... | Creates a new tunnel using the parameters and credentials present in
the given request.
@param request
The request describing the tunnel to create.
@return
The created tunnel, or null if the tunnel could not be created.
@throws GuacamoleException
If an error occurs while creating the tunnel. | [
"Creates",
"a",
"new",
"tunnel",
"using",
"the",
"parameters",
"and",
"credentials",
"present",
"in",
"the",
"given",
"request",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java#L382-L422 |
115,963 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelCollectionResource.java | TunnelCollectionResource.getTunnel | @Path("{tunnel}")
public TunnelResource getTunnel(@PathParam("tunnel") String tunnelUUID)
throws GuacamoleException {
Map<String, UserTunnel> tunnels = session.getTunnels();
// Pull tunnel with given UUID
final UserTunnel tunnel = tunnels.get(tunnelUUID);
if (tunnel == ... | java | @Path("{tunnel}")
public TunnelResource getTunnel(@PathParam("tunnel") String tunnelUUID)
throws GuacamoleException {
Map<String, UserTunnel> tunnels = session.getTunnels();
// Pull tunnel with given UUID
final UserTunnel tunnel = tunnels.get(tunnelUUID);
if (tunnel == ... | [
"@",
"Path",
"(",
"\"{tunnel}\"",
")",
"public",
"TunnelResource",
"getTunnel",
"(",
"@",
"PathParam",
"(",
"\"tunnel\"",
")",
"String",
"tunnelUUID",
")",
"throws",
"GuacamoleException",
"{",
"Map",
"<",
"String",
",",
"UserTunnel",
">",
"tunnels",
"=",
"sess... | Retrieves the tunnel having the given UUID, returning a TunnelResource
representing that tunnel. If no such tunnel exists, an exception will be
thrown.
@param tunnelUUID
The UUID of the tunnel to return via a TunnelResource.
@return
A TunnelResource which represents the tunnel having the given UUID.
@throws Guacamol... | [
"Retrieves",
"the",
"tunnel",
"having",
"the",
"given",
"UUID",
"returning",
"a",
"TunnelResource",
"representing",
"that",
"tunnel",
".",
"If",
"no",
"such",
"tunnel",
"exists",
"an",
"exception",
"will",
"be",
"thrown",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelCollectionResource.java#L96-L110 |
115,964 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java | ConnectionGroupTree.addConnections | private void addConnections(Collection<Connection> connections)
throws GuacamoleException {
// Add each connection to the tree
for (Connection connection : connections) {
// Retrieve the connection's parent group
APIConnectionGroup parent = retrievedGroups.get(connectio... | java | private void addConnections(Collection<Connection> connections)
throws GuacamoleException {
// Add each connection to the tree
for (Connection connection : connections) {
// Retrieve the connection's parent group
APIConnectionGroup parent = retrievedGroups.get(connectio... | [
"private",
"void",
"addConnections",
"(",
"Collection",
"<",
"Connection",
">",
"connections",
")",
"throws",
"GuacamoleException",
"{",
"// Add each connection to the tree",
"for",
"(",
"Connection",
"connection",
":",
"connections",
")",
"{",
"// Retrieve the connection... | Adds each of the provided connections to the current tree as children
of their respective parents. The parent connection groups must already
be added.
@param connections
The connections to add to the tree.
@throws GuacamoleException
If an error occurs while adding the connection to the tree. | [
"Adds",
"each",
"of",
"the",
"provided",
"connections",
"to",
"the",
"current",
"tree",
"as",
"children",
"of",
"their",
"respective",
"parents",
".",
"The",
"parent",
"connection",
"groups",
"must",
"already",
"be",
"added",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java#L109-L142 |
115,965 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java | ConnectionGroupTree.addConnectionGroups | private void addConnectionGroups(Collection<ConnectionGroup> connectionGroups) {
// Add each connection group to the tree
for (ConnectionGroup connectionGroup : connectionGroups) {
// Retrieve the connection group's parent group
APIConnectionGroup parent = retrievedGroups.get(c... | java | private void addConnectionGroups(Collection<ConnectionGroup> connectionGroups) {
// Add each connection group to the tree
for (ConnectionGroup connectionGroup : connectionGroups) {
// Retrieve the connection group's parent group
APIConnectionGroup parent = retrievedGroups.get(c... | [
"private",
"void",
"addConnectionGroups",
"(",
"Collection",
"<",
"ConnectionGroup",
">",
"connectionGroups",
")",
"{",
"// Add each connection group to the tree",
"for",
"(",
"ConnectionGroup",
"connectionGroup",
":",
"connectionGroups",
")",
"{",
"// Retrieve the connection... | Adds each of the provided connection groups to the current tree as
children of their respective parents. The parent connection groups must
already be added.
@param connectionGroups
The connection groups to add to the tree. | [
"Adds",
"each",
"of",
"the",
"provided",
"connection",
"groups",
"to",
"the",
"current",
"tree",
"as",
"children",
"of",
"their",
"respective",
"parents",
".",
"The",
"parent",
"connection",
"groups",
"must",
"already",
"be",
"added",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java#L152-L184 |
115,966 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java | ConnectionGroupTree.addSharingProfiles | private void addSharingProfiles(Collection<SharingProfile> sharingProfiles)
throws GuacamoleException {
// Add each sharing profile to the tree
for (SharingProfile sharingProfile : sharingProfiles) {
// Retrieve the sharing profile's associated connection
String primary... | java | private void addSharingProfiles(Collection<SharingProfile> sharingProfiles)
throws GuacamoleException {
// Add each sharing profile to the tree
for (SharingProfile sharingProfile : sharingProfiles) {
// Retrieve the sharing profile's associated connection
String primary... | [
"private",
"void",
"addSharingProfiles",
"(",
"Collection",
"<",
"SharingProfile",
">",
"sharingProfiles",
")",
"throws",
"GuacamoleException",
"{",
"// Add each sharing profile to the tree",
"for",
"(",
"SharingProfile",
"sharingProfile",
":",
"sharingProfiles",
")",
"{",
... | Adds each of the provided sharing profiles to the current tree as
children of their respective primary connections. The primary connections
must already be added.
@param sharingProfiles
The sharing profiles to add to the tree.
@throws GuacamoleException
If an error occurs while adding the sharing profiles to the tree... | [
"Adds",
"each",
"of",
"the",
"provided",
"sharing",
"profiles",
"to",
"the",
"current",
"tree",
"as",
"children",
"of",
"their",
"respective",
"primary",
"connections",
".",
"The",
"primary",
"connections",
"must",
"already",
"be",
"added",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java#L197-L232 |
115,967 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java | ConnectionGroupTree.addConnectionGroupDescendants | private void addConnectionGroupDescendants(Collection<ConnectionGroup> parents,
List<ObjectPermission.Type> permissions)
throws GuacamoleException {
// If no parents, nothing to do
if (parents.isEmpty())
return;
Collection<String> childConnectionIdentifiers = ne... | java | private void addConnectionGroupDescendants(Collection<ConnectionGroup> parents,
List<ObjectPermission.Type> permissions)
throws GuacamoleException {
// If no parents, nothing to do
if (parents.isEmpty())
return;
Collection<String> childConnectionIdentifiers = ne... | [
"private",
"void",
"addConnectionGroupDescendants",
"(",
"Collection",
"<",
"ConnectionGroup",
">",
"parents",
",",
"List",
"<",
"ObjectPermission",
".",
"Type",
">",
"permissions",
")",
"throws",
"GuacamoleException",
"{",
"// If no parents, nothing to do",
"if",
"(",
... | Adds all descendants of the given parent groups to their corresponding
parents already stored under root.
@param parents
The parents whose descendants should be added to the tree.
@param permissions
If specified and non-empty, limit added connections to only
connections for which the current user has any of the given... | [
"Adds",
"all",
"descendants",
"of",
"the",
"given",
"parent",
"groups",
"to",
"their",
"corresponding",
"parents",
"already",
"stored",
"under",
"root",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java#L250-L286 |
115,968 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java | ConnectionGroupTree.addConnectionDescendants | private void addConnectionDescendants(Collection<Connection> connections,
List<ObjectPermission.Type> permissions)
throws GuacamoleException {
// If no connections, nothing to do
if (connections.isEmpty())
return;
// Build lists of sharing profile identifiers fo... | java | private void addConnectionDescendants(Collection<Connection> connections,
List<ObjectPermission.Type> permissions)
throws GuacamoleException {
// If no connections, nothing to do
if (connections.isEmpty())
return;
// Build lists of sharing profile identifiers fo... | [
"private",
"void",
"addConnectionDescendants",
"(",
"Collection",
"<",
"Connection",
">",
"connections",
",",
"List",
"<",
"ObjectPermission",
".",
"Type",
">",
"permissions",
")",
"throws",
"GuacamoleException",
"{",
"// If no connections, nothing to do",
"if",
"(",
... | Adds all descendant sharing profiles of the given connections to their
corresponding primary connections already stored under root.
@param connections
The connections whose descendant sharing profiles should be added to
the tree.
@param permissions
If specified and non-empty, limit added sharing profiles to only
thos... | [
"Adds",
"all",
"descendant",
"sharing",
"profiles",
"of",
"the",
"given",
"connections",
"to",
"their",
"corresponding",
"primary",
"connections",
"already",
"stored",
"under",
"root",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupTree.java#L304-L328 |
115,969 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java | TunnelRequest.getRequiredParameter | public String getRequiredParameter(String name) throws GuacamoleException {
// Pull requested parameter, aborting if absent
String value = getParameter(name);
if (value == null)
throw new GuacamoleClientException("Parameter \"" + name + "\" is required.");
return value;
... | java | public String getRequiredParameter(String name) throws GuacamoleException {
// Pull requested parameter, aborting if absent
String value = getParameter(name);
if (value == null)
throw new GuacamoleClientException("Parameter \"" + name + "\" is required.");
return value;
... | [
"public",
"String",
"getRequiredParameter",
"(",
"String",
"name",
")",
"throws",
"GuacamoleException",
"{",
"// Pull requested parameter, aborting if absent",
"String",
"value",
"=",
"getParameter",
"(",
"name",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"thr... | Returns the value of the parameter having the given name, throwing an
exception if the parameter is missing.
@param name
The name of the parameter to return.
@return
The value of the parameter having the given name.
@throws GuacamoleException
If the parameter is not present in the request. | [
"Returns",
"the",
"value",
"of",
"the",
"parameter",
"having",
"the",
"given",
"name",
"throwing",
"an",
"exception",
"if",
"the",
"parameter",
"is",
"missing",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java#L170-L179 |
115,970 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java | TunnelRequest.getIntegerParameter | public Integer getIntegerParameter(String name) throws GuacamoleException {
// Pull requested parameter
String value = getParameter(name);
if (value == null)
return null;
// Attempt to parse as an integer
try {
return Integer.parseInt(value);
}
... | java | public Integer getIntegerParameter(String name) throws GuacamoleException {
// Pull requested parameter
String value = getParameter(name);
if (value == null)
return null;
// Attempt to parse as an integer
try {
return Integer.parseInt(value);
}
... | [
"public",
"Integer",
"getIntegerParameter",
"(",
"String",
"name",
")",
"throws",
"GuacamoleException",
"{",
"// Pull requested parameter",
"String",
"value",
"=",
"getParameter",
"(",
"name",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"return",
"null",
";... | Returns the integer value of the parameter having the given name,
throwing an exception if the parameter cannot be parsed.
@param name
The name of the parameter to return.
@return
The integer value of the parameter having the given name, or null if
the parameter is missing.
@throws GuacamoleException
If the paramete... | [
"Returns",
"the",
"integer",
"value",
"of",
"the",
"parameter",
"having",
"the",
"given",
"name",
"throwing",
"an",
"exception",
"if",
"the",
"parameter",
"cannot",
"be",
"parsed",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java#L195-L212 |
115,971 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java | TunnelRequest.getType | public Type getType() throws GuacamoleException {
String type = getRequiredParameter(TYPE_PARAMETER);
// For each possible object type
for (Type possibleType : Type.values()) {
// Match against defined parameter value
if (type.equals(possibleType.PARAMETER_VALUE))
... | java | public Type getType() throws GuacamoleException {
String type = getRequiredParameter(TYPE_PARAMETER);
// For each possible object type
for (Type possibleType : Type.values()) {
// Match against defined parameter value
if (type.equals(possibleType.PARAMETER_VALUE))
... | [
"public",
"Type",
"getType",
"(",
")",
"throws",
"GuacamoleException",
"{",
"String",
"type",
"=",
"getRequiredParameter",
"(",
"TYPE_PARAMETER",
")",
";",
"// For each possible object type",
"for",
"(",
"Type",
"possibleType",
":",
"Type",
".",
"values",
"(",
")"... | Returns the type of object for which the tunnel is being requested.
@return
The type of object for which the tunnel is being requested.
@throws GuacamoleException
If the type was not present in the request, or if the type requested
is in the wrong format. | [
"Returns",
"the",
"type",
"of",
"object",
"for",
"which",
"the",
"tunnel",
"is",
"being",
"requested",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java#L255-L270 |
115,972 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java | PasswordPolicyService.matches | private boolean matches(String str, Pattern... patterns) {
// Check given string against all provided patterns
for (Pattern pattern : patterns) {
// Fail overall test if any pattern fails to match
Matcher matcher = pattern.matcher(str);
if (!matcher.find())
... | java | private boolean matches(String str, Pattern... patterns) {
// Check given string against all provided patterns
for (Pattern pattern : patterns) {
// Fail overall test if any pattern fails to match
Matcher matcher = pattern.matcher(str);
if (!matcher.find())
... | [
"private",
"boolean",
"matches",
"(",
"String",
"str",
",",
"Pattern",
"...",
"patterns",
")",
"{",
"// Check given string against all provided patterns",
"for",
"(",
"Pattern",
"pattern",
":",
"patterns",
")",
"{",
"// Fail overall test if any pattern fails to match",
"M... | Returns whether the given string matches all of the provided regular
expressions.
@param str
The string to test against all provided regular expressions.
@param patterns
The regular expressions to match against the given string.
@return
true if the given string matches all provided regular expressions,
false otherwi... | [
"Returns",
"whether",
"the",
"given",
"string",
"matches",
"all",
"of",
"the",
"provided",
"regular",
"expressions",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java#L97-L112 |
115,973 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java | PasswordPolicyService.matchesPreviousPasswords | private boolean matchesPreviousPasswords(String password, String username,
int historySize) {
// No need to compare if no history is relevant
if (historySize <= 0)
return false;
// Check password against all recorded hashes
List<PasswordRecordModel> history = pa... | java | private boolean matchesPreviousPasswords(String password, String username,
int historySize) {
// No need to compare if no history is relevant
if (historySize <= 0)
return false;
// Check password against all recorded hashes
List<PasswordRecordModel> history = pa... | [
"private",
"boolean",
"matchesPreviousPasswords",
"(",
"String",
"password",
",",
"String",
"username",
",",
"int",
"historySize",
")",
"{",
"// No need to compare if no history is relevant",
"if",
"(",
"historySize",
"<=",
"0",
")",
"return",
"false",
";",
"// Check ... | Returns whether the given password matches any of the user's previous
passwords. Regardless of the value specified here, the maximum number of
passwords involved in this check depends on how many previous passwords
were actually recorded, which depends on the password policy.
@param password
The password to check.
@p... | [
"Returns",
"whether",
"the",
"given",
"password",
"matches",
"any",
"of",
"the",
"user",
"s",
"previous",
"passwords",
".",
"Regardless",
"of",
"the",
"value",
"specified",
"here",
"the",
"maximum",
"number",
"of",
"passwords",
"involved",
"in",
"this",
"check... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java#L135-L155 |
115,974 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java | PasswordPolicyService.verifyPassword | public void verifyPassword(String username, String password)
throws GuacamoleException {
// Retrieve password policy from environment
PasswordPolicy policy = environment.getPasswordPolicy();
// Enforce minimum password length
if (password.length() < policy.getMinimumLength(... | java | public void verifyPassword(String username, String password)
throws GuacamoleException {
// Retrieve password policy from environment
PasswordPolicy policy = environment.getPasswordPolicy();
// Enforce minimum password length
if (password.length() < policy.getMinimumLength(... | [
"public",
"void",
"verifyPassword",
"(",
"String",
"username",
",",
"String",
"password",
")",
"throws",
"GuacamoleException",
"{",
"// Retrieve password policy from environment",
"PasswordPolicy",
"policy",
"=",
"environment",
".",
"getPasswordPolicy",
"(",
")",
";",
"... | Verifies that the given new password complies with the password policy
configured within guacamole.properties, throwing a GuacamoleException if
the policy is violated in any way.
@param username
The username of the user whose password is being changed.
@param password
The proposed new password.
@throws GuacamoleExce... | [
"Verifies",
"that",
"the",
"given",
"new",
"password",
"complies",
"with",
"the",
"password",
"policy",
"configured",
"within",
"guacamole",
".",
"properties",
"throwing",
"a",
"GuacamoleException",
"if",
"the",
"policy",
"is",
"violated",
"in",
"any",
"way",
".... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java#L172-L212 |
115,975 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java | PasswordPolicyService.getPasswordAge | private long getPasswordAge(ModeledUser user) {
// If no password was set, then no time has elapsed
PasswordRecordModel passwordRecord = user.getPasswordRecord();
if (passwordRecord == null)
return 0;
// Pull both current time and the time the password was last reset
... | java | private long getPasswordAge(ModeledUser user) {
// If no password was set, then no time has elapsed
PasswordRecordModel passwordRecord = user.getPasswordRecord();
if (passwordRecord == null)
return 0;
// Pull both current time and the time the password was last reset
... | [
"private",
"long",
"getPasswordAge",
"(",
"ModeledUser",
"user",
")",
"{",
"// If no password was set, then no time has elapsed",
"PasswordRecordModel",
"passwordRecord",
"=",
"user",
".",
"getPasswordRecord",
"(",
")",
";",
"if",
"(",
"passwordRecord",
"==",
"null",
")... | Returns the age of the given user's password, in days. The age of a
user's password is the amount of time elapsed since the password was last
changed or reset.
@param user
The user to calculate the password age of.
@return
The age of the given user's password, in days. | [
"Returns",
"the",
"age",
"of",
"the",
"given",
"user",
"s",
"password",
"in",
"days",
".",
"The",
"age",
"of",
"a",
"user",
"s",
"password",
"is",
"the",
"amount",
"of",
"time",
"elapsed",
"since",
"the",
"password",
"was",
"last",
"changed",
"or",
"re... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java#L225-L239 |
115,976 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java | PasswordPolicyService.verifyPasswordAge | public void verifyPasswordAge(ModeledUser user) throws GuacamoleException {
// Retrieve password policy from environment
PasswordPolicy policy = environment.getPasswordPolicy();
long minimumAge = policy.getMinimumAge();
long passwordAge = getPasswordAge(user);
// Require that ... | java | public void verifyPasswordAge(ModeledUser user) throws GuacamoleException {
// Retrieve password policy from environment
PasswordPolicy policy = environment.getPasswordPolicy();
long minimumAge = policy.getMinimumAge();
long passwordAge = getPasswordAge(user);
// Require that ... | [
"public",
"void",
"verifyPasswordAge",
"(",
"ModeledUser",
"user",
")",
"throws",
"GuacamoleException",
"{",
"// Retrieve password policy from environment",
"PasswordPolicy",
"policy",
"=",
"environment",
".",
"getPasswordPolicy",
"(",
")",
";",
"long",
"minimumAge",
"=",... | Verifies that the given user can change their password without violating
password aging policy. If changing the user's password would violate the
aging policy, a GuacamoleException will be thrown.
@param user
The user whose password is changing.
@throws GuacamoleException
If the user's password cannot be changed due ... | [
"Verifies",
"that",
"the",
"given",
"user",
"can",
"change",
"their",
"password",
"without",
"violating",
"password",
"aging",
"policy",
".",
"If",
"changing",
"the",
"user",
"s",
"password",
"would",
"violate",
"the",
"aging",
"policy",
"a",
"GuacamoleException... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java#L254-L268 |
115,977 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java | PasswordPolicyService.isPasswordExpired | public boolean isPasswordExpired(ModeledUser user)
throws GuacamoleException {
// Retrieve password policy from environment
PasswordPolicy policy = environment.getPasswordPolicy();
// There is no maximum password age if 0
int maxPasswordAge = policy.getMaximumAge();
... | java | public boolean isPasswordExpired(ModeledUser user)
throws GuacamoleException {
// Retrieve password policy from environment
PasswordPolicy policy = environment.getPasswordPolicy();
// There is no maximum password age if 0
int maxPasswordAge = policy.getMaximumAge();
... | [
"public",
"boolean",
"isPasswordExpired",
"(",
"ModeledUser",
"user",
")",
"throws",
"GuacamoleException",
"{",
"// Retrieve password policy from environment",
"PasswordPolicy",
"policy",
"=",
"environment",
".",
"getPasswordPolicy",
"(",
")",
";",
"// There is no maximum pas... | Returns whether the given user's password is expired due to the password
aging policy.
@param user
The user to check.
@return
true if the user needs to change their password to comply with the
password aging policy, false otherwise.
@throws GuacamoleException
If the password policy cannot be parsed. | [
"Returns",
"whether",
"the",
"given",
"user",
"s",
"password",
"is",
"expired",
"due",
"to",
"the",
"password",
"aging",
"policy",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java#L284-L298 |
115,978 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java | PasswordPolicyService.recordPassword | public void recordPassword(ModeledUser user)
throws GuacamoleException {
// Retrieve password policy from environment
PasswordPolicy policy = environment.getPasswordPolicy();
// Nothing to do if history is not being recorded
int historySize = policy.getHistorySize();
... | java | public void recordPassword(ModeledUser user)
throws GuacamoleException {
// Retrieve password policy from environment
PasswordPolicy policy = environment.getPasswordPolicy();
// Nothing to do if history is not being recorded
int historySize = policy.getHistorySize();
... | [
"public",
"void",
"recordPassword",
"(",
"ModeledUser",
"user",
")",
"throws",
"GuacamoleException",
"{",
"// Retrieve password policy from environment",
"PasswordPolicy",
"policy",
"=",
"environment",
".",
"getPasswordPolicy",
"(",
")",
";",
"// Nothing to do if history is n... | Records the password that was associated with the given user at the time
the user was queried, such that future attempts to set that same password
for that user will be denied. The number of passwords remembered for each
user is limited by the password policy.
@param user
The user whose password should be recorded wit... | [
"Records",
"the",
"password",
"that",
"was",
"associated",
"with",
"the",
"given",
"user",
"at",
"the",
"time",
"the",
"user",
"was",
"queried",
"such",
"that",
"future",
"attempts",
"to",
"set",
"that",
"same",
"password",
"for",
"that",
"user",
"will",
"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicyService.java#L313-L327 |
115,979 | glyptodon/guacamole-client | extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/api/SignedDuoCookie.java | SignedDuoCookie.sign | private static String sign(String key, String data) throws GuacamoleException {
try {
// Attempt to sign UTF-8 bytes of provided data
Mac mac = Mac.getInstance(SIGNATURE_ALGORITHM);
mac.init(new SecretKeySpec(key.getBytes("UTF-8"), SIGNATURE_ALGORITHM));
// Ret... | java | private static String sign(String key, String data) throws GuacamoleException {
try {
// Attempt to sign UTF-8 bytes of provided data
Mac mac = Mac.getInstance(SIGNATURE_ALGORITHM);
mac.init(new SecretKeySpec(key.getBytes("UTF-8"), SIGNATURE_ALGORITHM));
// Ret... | [
"private",
"static",
"String",
"sign",
"(",
"String",
"key",
",",
"String",
"data",
")",
"throws",
"GuacamoleException",
"{",
"try",
"{",
"// Attempt to sign UTF-8 bytes of provided data",
"Mac",
"mac",
"=",
"Mac",
".",
"getInstance",
"(",
"SIGNATURE_ALGORITHM",
")"... | Signs the given arbitrary string data with the given key using the
algorithm defined by SIGNATURE_ALGORITHM. Both the data and the key will
be interpreted as UTF-8 bytes.
@param key
The key which should be used to sign the given data.
@param data
The data being signed.
@return
The signature produced by signing the g... | [
"Signs",
"the",
"given",
"arbitrary",
"string",
"data",
"with",
"the",
"given",
"key",
"using",
"the",
"algorithm",
"defined",
"by",
"SIGNATURE_ALGORITHM",
".",
"Both",
"the",
"data",
"and",
"the",
"key",
"will",
"be",
"interpreted",
"as",
"UTF",
"-",
"8",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/api/SignedDuoCookie.java#L215-L243 |
115,980 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/net/auth/credentials/UserCredentials.java | UserCredentials.setValue | public String setValue(String name, String value) {
return values.put(name, value);
} | java | public String setValue(String name, String value) {
return values.put(name, value);
} | [
"public",
"String",
"setValue",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"return",
"values",
".",
"put",
"(",
"name",
",",
"value",
")",
";",
"}"
] | Sets the value of the field having the given name. Any existing value
for that field is replaced.
@param name
The name of the field whose value should be assigned.
@param value
The value to assign to the field having the given name.
@return
The previous value of the field, or null if the value of the field
was not p... | [
"Sets",
"the",
"value",
"of",
"the",
"field",
"having",
"the",
"given",
"name",
".",
"Any",
"existing",
"value",
"for",
"that",
"field",
"is",
"replaced",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/credentials/UserCredentials.java#L164-L166 |
115,981 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/net/auth/credentials/UserCredentials.java | UserCredentials.setValue | public String setValue(Field field, String value) {
return setValue(field.getName(), value);
} | java | public String setValue(Field field, String value) {
return setValue(field.getName(), value);
} | [
"public",
"String",
"setValue",
"(",
"Field",
"field",
",",
"String",
"value",
")",
"{",
"return",
"setValue",
"(",
"field",
".",
"getName",
"(",
")",
",",
"value",
")",
";",
"}"
] | Sets the value of the given field. Any existing value for that field is
replaced.
@param field
The field whose value should be assigned.
@param value
The value to assign to the given field.
@return
The previous value of the field, or null if the value of the field
was not previously defined. | [
"Sets",
"the",
"value",
"of",
"the",
"given",
"field",
".",
"Any",
"existing",
"value",
"for",
"that",
"field",
"is",
"replaced",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/credentials/UserCredentials.java#L182-L184 |
115,982 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledPermissions.java | ModeledPermissions.isAdministrator | public boolean isAdministrator() throws GuacamoleException {
SystemPermissionSet systemPermissionSet = getEffective().getSystemPermissions();
return systemPermissionSet.hasPermission(SystemPermission.Type.ADMINISTER);
} | java | public boolean isAdministrator() throws GuacamoleException {
SystemPermissionSet systemPermissionSet = getEffective().getSystemPermissions();
return systemPermissionSet.hasPermission(SystemPermission.Type.ADMINISTER);
} | [
"public",
"boolean",
"isAdministrator",
"(",
")",
"throws",
"GuacamoleException",
"{",
"SystemPermissionSet",
"systemPermissionSet",
"=",
"getEffective",
"(",
")",
".",
"getSystemPermissions",
"(",
")",
";",
"return",
"systemPermissionSet",
".",
"hasPermission",
"(",
... | Returns whether this entity is a system administrator, and thus is not
restricted by permissions, taking into account permission inheritance
via user groups.
@return
true if this entity is a system administrator, false otherwise.
@throws GuacamoleException
If an error occurs while determining the entity's system admi... | [
"Returns",
"whether",
"this",
"entity",
"is",
"a",
"system",
"administrator",
"and",
"thus",
"is",
"not",
"restricted",
"by",
"permissions",
"taking",
"into",
"account",
"permission",
"inheritance",
"via",
"user",
"groups",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledPermissions.java#L146-L149 |
115,983 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledPermissions.java | ModeledPermissions.getEffective | public Permissions getEffective() {
final ModeledAuthenticatedUser authenticatedUser = getCurrentUser();
final Set<String> effectiveGroups;
// If this user is the currently-authenticated user, include any
// additional effective groups declared by the authentication system
if (... | java | public Permissions getEffective() {
final ModeledAuthenticatedUser authenticatedUser = getCurrentUser();
final Set<String> effectiveGroups;
// If this user is the currently-authenticated user, include any
// additional effective groups declared by the authentication system
if (... | [
"public",
"Permissions",
"getEffective",
"(",
")",
"{",
"final",
"ModeledAuthenticatedUser",
"authenticatedUser",
"=",
"getCurrentUser",
"(",
")",
";",
"final",
"Set",
"<",
"String",
">",
"effectiveGroups",
";",
"// If this user is the currently-authenticated user, include ... | Returns a Permissions object which represents all permissions granted to
this entity, including any permissions inherited through group
membership.
@return
A Permissions object which represents all permissions granted to
this entity. | [
"Returns",
"a",
"Permissions",
"object",
"which",
"represents",
"all",
"permissions",
"granted",
"to",
"this",
"entity",
"including",
"any",
"permissions",
"inherited",
"through",
"group",
"membership",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledPermissions.java#L222-L284 |
115,984 | glyptodon/guacamole-client | extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java | RadiusConnectionService.createRadiusConnection | private RadiusClient createRadiusConnection() throws GuacamoleException {
// Create the RADIUS client with the configuration parameters
try {
return new RadiusClient(InetAddress.getByName(confService.getRadiusServer()),
confService.getRadiusShared... | java | private RadiusClient createRadiusConnection() throws GuacamoleException {
// Create the RADIUS client with the configuration parameters
try {
return new RadiusClient(InetAddress.getByName(confService.getRadiusServer()),
confService.getRadiusShared... | [
"private",
"RadiusClient",
"createRadiusConnection",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Create the RADIUS client with the configuration parameters",
"try",
"{",
"return",
"new",
"RadiusClient",
"(",
"InetAddress",
".",
"getByName",
"(",
"confService",
".",
"... | Creates a new instance of RadiusClient, configured with parameters
from guacamole.properties.
@return
A RadiusClient instance, configured with server, shared secret,
ports, and timeout, as configured in guacamole.properties.
@throws GuacamoleException
If an error occurs while parsing guacamole.properties, or if the
c... | [
"Creates",
"a",
"new",
"instance",
"of",
"RadiusClient",
"configured",
"with",
"parameters",
"from",
"guacamole",
".",
"properties",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java#L79-L98 |
115,985 | glyptodon/guacamole-client | extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java | RadiusConnectionService.setupRadiusAuthenticator | private RadiusAuthenticator setupRadiusAuthenticator(RadiusClient radiusClient)
throws GuacamoleException {
// If we don't have a radiusClient object, yet, don't go any further.
if (radiusClient == null) {
logger.error("RADIUS client hasn't been set up, yet.");
logge... | java | private RadiusAuthenticator setupRadiusAuthenticator(RadiusClient radiusClient)
throws GuacamoleException {
// If we don't have a radiusClient object, yet, don't go any further.
if (radiusClient == null) {
logger.error("RADIUS client hasn't been set up, yet.");
logge... | [
"private",
"RadiusAuthenticator",
"setupRadiusAuthenticator",
"(",
"RadiusClient",
"radiusClient",
")",
"throws",
"GuacamoleException",
"{",
"// If we don't have a radiusClient object, yet, don't go any further.",
"if",
"(",
"radiusClient",
"==",
"null",
")",
"{",
"logger",
"."... | Creates a new instance of RadiusAuthentictor, configured with
parameters specified within guacamole.properties.
@param radiusClient
A RadiusClient instance that has been initialized to
communicate with a RADIUS server.
@return
A new RadiusAuthenticator instance which has been configured
with parameters from guacamole... | [
"Creates",
"a",
"new",
"instance",
"of",
"RadiusAuthentictor",
"configured",
"with",
"parameters",
"specified",
"within",
"guacamole",
".",
"properties",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java#L118-L169 |
115,986 | glyptodon/guacamole-client | extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java | RadiusConnectionService.authenticate | public RadiusPacket authenticate(String username, String secret, byte[] state)
throws GuacamoleException {
// If a username wasn't passed, we quit
if (username == null || username.isEmpty()) {
logger.warn("Anonymous access not allowed with RADIUS client.");
return nu... | java | public RadiusPacket authenticate(String username, String secret, byte[] state)
throws GuacamoleException {
// If a username wasn't passed, we quit
if (username == null || username.isEmpty()) {
logger.warn("Anonymous access not allowed with RADIUS client.");
return nu... | [
"public",
"RadiusPacket",
"authenticate",
"(",
"String",
"username",
",",
"String",
"secret",
",",
"byte",
"[",
"]",
"state",
")",
"throws",
"GuacamoleException",
"{",
"// If a username wasn't passed, we quit",
"if",
"(",
"username",
"==",
"null",
"||",
"username",
... | Authenticate to the RADIUS server using existing state and a response
@param username
The username for the authentication
@param secret
The secret, usually a password or challenge response, to send
to authenticate to the RADIUS server.
@param state
The previous state of the RADIUS connection
@return
A RadiusPacket ... | [
"Authenticate",
"to",
"the",
"RADIUS",
"server",
"using",
"existing",
"state",
"and",
"a",
"response"
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java#L190-L261 |
115,987 | glyptodon/guacamole-client | extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java | RadiusConnectionService.sendChallengeResponse | public RadiusPacket sendChallengeResponse(String username, String response, byte[] state)
throws GuacamoleException {
if (username == null || username.isEmpty()) {
logger.error("Challenge/response to RADIUS requires a username.");
return null;
}
if (state ==... | java | public RadiusPacket sendChallengeResponse(String username, String response, byte[] state)
throws GuacamoleException {
if (username == null || username.isEmpty()) {
logger.error("Challenge/response to RADIUS requires a username.");
return null;
}
if (state ==... | [
"public",
"RadiusPacket",
"sendChallengeResponse",
"(",
"String",
"username",
",",
"String",
"response",
",",
"byte",
"[",
"]",
"state",
")",
"throws",
"GuacamoleException",
"{",
"if",
"(",
"username",
"==",
"null",
"||",
"username",
".",
"isEmpty",
"(",
")",
... | Send a challenge response to the RADIUS server by validating the input and
then sending it along to the authenticate method.
@param username
The username to send to the RADIUS server for authentication.
@param response
The response phrase to send to the RADIUS server in response to the
challenge previously provided.
... | [
"Send",
"a",
"challenge",
"response",
"to",
"the",
"RADIUS",
"server",
"by",
"validating",
"the",
"input",
"and",
"then",
"sending",
"it",
"along",
"to",
"the",
"authenticate",
"method",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java#L285-L305 |
115,988 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/RelatedObjectSet.java | RelatedObjectSet.canAlterRelation | private boolean canAlterRelation(Collection<String> identifiers)
throws GuacamoleException {
// System administrators may alter any relations
if (getCurrentUser().getUser().isAdministrator())
return true;
// Non-admin users require UPDATE permission on the parent object... | java | private boolean canAlterRelation(Collection<String> identifiers)
throws GuacamoleException {
// System administrators may alter any relations
if (getCurrentUser().getUser().isAdministrator())
return true;
// Non-admin users require UPDATE permission on the parent object... | [
"private",
"boolean",
"canAlterRelation",
"(",
"Collection",
"<",
"String",
">",
"identifiers",
")",
"throws",
"GuacamoleException",
"{",
"// System administrators may alter any relations",
"if",
"(",
"getCurrentUser",
"(",
")",
".",
"getUser",
"(",
")",
".",
"isAdmin... | Returns whether the current user has permission to alter the status of
the relation between the parent object and the given child objects.
@param identifiers
The identifiers of all objects on the child side of the one-to-many
relation being changed.
@return
true if the user has permission to make the described change... | [
"Returns",
"whether",
"the",
"current",
"user",
"has",
"permission",
"to",
"alter",
"the",
"status",
"of",
"the",
"relation",
"between",
"the",
"parent",
"object",
"and",
"the",
"given",
"child",
"objects",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/RelatedObjectSet.java#L140-L160 |
115,989 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/RESTMethodMatcher.java | RESTMethodMatcher.methodThrowsException | private boolean methodThrowsException(Method method,
Class<? extends Exception> exceptionType) {
// Check whether the method throws an exception of the specified type
for (Class<?> thrownType : method.getExceptionTypes()) {
if (exceptionType.isAssignableFrom(thrownType))
... | java | private boolean methodThrowsException(Method method,
Class<? extends Exception> exceptionType) {
// Check whether the method throws an exception of the specified type
for (Class<?> thrownType : method.getExceptionTypes()) {
if (exceptionType.isAssignableFrom(thrownType))
... | [
"private",
"boolean",
"methodThrowsException",
"(",
"Method",
"method",
",",
"Class",
"<",
"?",
"extends",
"Exception",
">",
"exceptionType",
")",
"{",
"// Check whether the method throws an exception of the specified type",
"for",
"(",
"Class",
"<",
"?",
">",
"thrownTy... | Returns whether the given method throws the specified exception type,
including any subclasses of that type.
@param method
The method to test.
@param exceptionType
The exception type to test for.
@return
true if the given method throws an exception of the specified type,
false otherwise. | [
"Returns",
"whether",
"the",
"given",
"method",
"throws",
"the",
"specified",
"exception",
"type",
"including",
"any",
"subclasses",
"of",
"that",
"type",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/RESTMethodMatcher.java#L52-L64 |
115,990 | glyptodon/guacamole-client | guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java | GuacamoleHTTPTunnelMap.get | public GuacamoleHTTPTunnel get(String uuid) {
// Update the last access time
GuacamoleHTTPTunnel tunnel = tunnelMap.get(uuid);
if (tunnel != null)
tunnel.access();
// Return tunnel, if any
return tunnel;
} | java | public GuacamoleHTTPTunnel get(String uuid) {
// Update the last access time
GuacamoleHTTPTunnel tunnel = tunnelMap.get(uuid);
if (tunnel != null)
tunnel.access();
// Return tunnel, if any
return tunnel;
} | [
"public",
"GuacamoleHTTPTunnel",
"get",
"(",
"String",
"uuid",
")",
"{",
"// Update the last access time",
"GuacamoleHTTPTunnel",
"tunnel",
"=",
"tunnelMap",
".",
"get",
"(",
"uuid",
")",
";",
"if",
"(",
"tunnel",
"!=",
"null",
")",
"tunnel",
".",
"access",
"(... | Returns the GuacamoleTunnel having the given UUID, wrapped within a
GuacamoleHTTPTunnel. If the no tunnel having the given UUID is
available, null is returned.
@param uuid
The UUID of the tunnel to retrieve.
@return
The GuacamoleTunnel having the given UUID, wrapped within a
GuacamoleHTTPTunnel, if such a tunnel exis... | [
"Returns",
"the",
"GuacamoleTunnel",
"having",
"the",
"given",
"UUID",
"wrapped",
"within",
"a",
"GuacamoleHTTPTunnel",
".",
"If",
"the",
"no",
"tunnel",
"having",
"the",
"given",
"UUID",
"is",
"available",
"null",
"is",
"returned",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java#L156-L166 |
115,991 | glyptodon/guacamole-client | guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java | GuacamoleHTTPTunnelMap.put | public void put(String uuid, GuacamoleTunnel tunnel) {
tunnelMap.put(uuid, new GuacamoleHTTPTunnel(tunnel));
} | java | public void put(String uuid, GuacamoleTunnel tunnel) {
tunnelMap.put(uuid, new GuacamoleHTTPTunnel(tunnel));
} | [
"public",
"void",
"put",
"(",
"String",
"uuid",
",",
"GuacamoleTunnel",
"tunnel",
")",
"{",
"tunnelMap",
".",
"put",
"(",
"uuid",
",",
"new",
"GuacamoleHTTPTunnel",
"(",
"tunnel",
")",
")",
";",
"}"
] | Registers that a new connection has been established using HTTP via the
given GuacamoleTunnel.
@param uuid
The UUID of the tunnel being added (registered).
@param tunnel
The GuacamoleTunnel being registered, its associated connection
having just been established via HTTP. | [
"Registers",
"that",
"a",
"new",
"connection",
"has",
"been",
"established",
"using",
"HTTP",
"via",
"the",
"given",
"GuacamoleTunnel",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java#L179-L181 |
115,992 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryObjectResource.java | DirectoryObjectResource.updateObject | @PUT
public void updateObject(ExternalType modifiedObject) throws GuacamoleException {
// Validate that data was provided
if (modifiedObject == null)
throw new GuacamoleClientException("Data must be submitted when updating objects.");
// Filter/sanitize object contents
... | java | @PUT
public void updateObject(ExternalType modifiedObject) throws GuacamoleException {
// Validate that data was provided
if (modifiedObject == null)
throw new GuacamoleClientException("Data must be submitted when updating objects.");
// Filter/sanitize object contents
... | [
"@",
"PUT",
"public",
"void",
"updateObject",
"(",
"ExternalType",
"modifiedObject",
")",
"throws",
"GuacamoleException",
"{",
"// Validate that data was provided",
"if",
"(",
"modifiedObject",
"==",
"null",
")",
"throw",
"new",
"GuacamoleClientException",
"(",
"\"Data ... | Updates an existing object. The changes to be made to the corresponding
object within the directory indicated by the provided data.
@param modifiedObject
The data to update the corresponding object with.
@throws GuacamoleException
If an error occurs while updating the object. | [
"Updates",
"an",
"existing",
"object",
".",
"The",
"changes",
"to",
"be",
"made",
"to",
"the",
"corresponding",
"object",
"within",
"the",
"directory",
"indicated",
"by",
"the",
"provided",
"data",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryObjectResource.java#L129-L143 |
115,993 | glyptodon/guacamole-client | extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java | ConfigurationService.getRadiusCAFile | public File getRadiusCAFile() throws GuacamoleException {
return environment.getProperty(
RadiusGuacamoleProperties.RADIUS_CA_FILE,
new File(environment.getGuacamoleHome(), "ca.crt")
);
} | java | public File getRadiusCAFile() throws GuacamoleException {
return environment.getProperty(
RadiusGuacamoleProperties.RADIUS_CA_FILE,
new File(environment.getGuacamoleHome(), "ca.crt")
);
} | [
"public",
"File",
"getRadiusCAFile",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"environment",
".",
"getProperty",
"(",
"RadiusGuacamoleProperties",
".",
"RADIUS_CA_FILE",
",",
"new",
"File",
"(",
"environment",
".",
"getGuacamoleHome",
"(",
")",
",",
... | Returns the CA file for validating certificates for encrypted
connections to the RADIUS server, as configured in
guacamole.properties.
@return
The file name for the CA file for validating
RADIUS server certificates
@throws GuacamoleException
If guacamole.properties cannot be parsed. | [
"Returns",
"the",
"CA",
"file",
"for",
"validating",
"certificates",
"for",
"encrypted",
"connections",
"to",
"the",
"RADIUS",
"server",
"as",
"configured",
"in",
"guacamole",
".",
"properties",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java#L180-L185 |
115,994 | glyptodon/guacamole-client | extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java | ConfigurationService.getRadiusKeyFile | public File getRadiusKeyFile() throws GuacamoleException {
return environment.getProperty(
RadiusGuacamoleProperties.RADIUS_KEY_FILE,
new File(environment.getGuacamoleHome(), "radius.key")
);
} | java | public File getRadiusKeyFile() throws GuacamoleException {
return environment.getProperty(
RadiusGuacamoleProperties.RADIUS_KEY_FILE,
new File(environment.getGuacamoleHome(), "radius.key")
);
} | [
"public",
"File",
"getRadiusKeyFile",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"environment",
".",
"getProperty",
"(",
"RadiusGuacamoleProperties",
".",
"RADIUS_KEY_FILE",
",",
"new",
"File",
"(",
"environment",
".",
"getGuacamoleHome",
"(",
")",
","... | Returns the key file for the client for creating encrypted
connections to RADIUS servers as specified in
guacamole.properties. By default a file called radius.pem
is used.
@return
The file name for the client certificate/key pair
for making encrypted RADIUS connections.
@throws GuacamoleException
If guacamole.proper... | [
"Returns",
"the",
"key",
"file",
"for",
"the",
"client",
"for",
"creating",
"encrypted",
"connections",
"to",
"RADIUS",
"servers",
"as",
"specified",
"in",
"guacamole",
".",
"properties",
".",
"By",
"default",
"a",
"file",
"called",
"radius",
".",
"pem",
"is... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/ConfigurationService.java#L200-L205 |
115,995 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java | ModeledDirectoryObjectService.hasObjectPermission | protected boolean hasObjectPermission(ModeledAuthenticatedUser user,
String identifier, ObjectPermission.Type type)
throws GuacamoleException {
// Get object permissions
ObjectPermissionSet permissionSet = getEffectivePermissionSet(user);
// Return whether permi... | java | protected boolean hasObjectPermission(ModeledAuthenticatedUser user,
String identifier, ObjectPermission.Type type)
throws GuacamoleException {
// Get object permissions
ObjectPermissionSet permissionSet = getEffectivePermissionSet(user);
// Return whether permi... | [
"protected",
"boolean",
"hasObjectPermission",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"String",
"identifier",
",",
"ObjectPermission",
".",
"Type",
"type",
")",
"throws",
"GuacamoleException",
"{",
"// Get object permissions",
"ObjectPermissionSet",
"permissionSet",
... | Returns whether the given user has permission to perform a certain
action on a specific object managed by this directory object service,
taking into account permission inheritance through user groups.
@param user
The user being checked.
@param identifier
The identifier of the object to check.
@param type
The type of... | [
"Returns",
"whether",
"the",
"given",
"user",
"has",
"permission",
"to",
"perform",
"a",
"certain",
"action",
"on",
"a",
"specific",
"object",
"managed",
"by",
"this",
"directory",
"object",
"service",
"taking",
"into",
"account",
"permission",
"inheritance",
"t... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java#L166-L177 |
115,996 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java | ModeledDirectoryObjectService.getObjectInstances | protected Collection<InternalType> getObjectInstances(ModeledAuthenticatedUser currentUser,
Collection<ModelType> models) throws GuacamoleException {
// Create new collection of objects by manually converting each model
Collection<InternalType> objects = new ArrayList<InternalType>(models.s... | java | protected Collection<InternalType> getObjectInstances(ModeledAuthenticatedUser currentUser,
Collection<ModelType> models) throws GuacamoleException {
// Create new collection of objects by manually converting each model
Collection<InternalType> objects = new ArrayList<InternalType>(models.s... | [
"protected",
"Collection",
"<",
"InternalType",
">",
"getObjectInstances",
"(",
"ModeledAuthenticatedUser",
"currentUser",
",",
"Collection",
"<",
"ModelType",
">",
"models",
")",
"throws",
"GuacamoleException",
"{",
"// Create new collection of objects by manually converting e... | Returns a collection of objects which are backed by the models in the
given collection.
@param currentUser
The user for whom these objects are being created.
@param models
The model objects to use to back the objects within the returned
collection.
@return
A collection of objects which are backed by the models in th... | [
"Returns",
"a",
"collection",
"of",
"objects",
"which",
"are",
"backed",
"by",
"the",
"models",
"in",
"the",
"given",
"collection",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java#L216-L226 |
115,997 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java | ModeledDirectoryObjectService.isValidIdentifier | protected boolean isValidIdentifier(String identifier) {
// Empty identifiers are invalid
if (identifier.isEmpty())
return false;
// Identifier is invalid if any non-numeric characters are present
for (int i = 0; i < identifier.length(); i++) {
if (!Character.is... | java | protected boolean isValidIdentifier(String identifier) {
// Empty identifiers are invalid
if (identifier.isEmpty())
return false;
// Identifier is invalid if any non-numeric characters are present
for (int i = 0; i < identifier.length(); i++) {
if (!Character.is... | [
"protected",
"boolean",
"isValidIdentifier",
"(",
"String",
"identifier",
")",
"{",
"// Empty identifiers are invalid",
"if",
"(",
"identifier",
".",
"isEmpty",
"(",
")",
")",
"return",
"false",
";",
"// Identifier is invalid if any non-numeric characters are present",
"for... | Returns whether the given string is a valid identifier within the JDBC
authentication extension. Invalid identifiers may result in SQL errors
from the underlying database when used in queries.
@param identifier
The string to check for validity.
@return
true if the given string is a valid identifier, false otherwise. | [
"Returns",
"whether",
"the",
"given",
"string",
"is",
"a",
"valid",
"identifier",
"within",
"the",
"JDBC",
"authentication",
"extension",
".",
"Invalid",
"identifiers",
"may",
"result",
"in",
"SQL",
"errors",
"from",
"the",
"underlying",
"database",
"when",
"use... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java#L320-L335 |
115,998 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java | ModeledDirectoryObjectService.filterIdentifiers | protected Collection<String> filterIdentifiers(Collection<String> identifiers) {
// Obtain enough space for a full copy of the given identifiers
Collection<String> validIdentifiers = new ArrayList<String>(identifiers.size());
// Add only valid identifiers to the copy
for (String identi... | java | protected Collection<String> filterIdentifiers(Collection<String> identifiers) {
// Obtain enough space for a full copy of the given identifiers
Collection<String> validIdentifiers = new ArrayList<String>(identifiers.size());
// Add only valid identifiers to the copy
for (String identi... | [
"protected",
"Collection",
"<",
"String",
">",
"filterIdentifiers",
"(",
"Collection",
"<",
"String",
">",
"identifiers",
")",
"{",
"// Obtain enough space for a full copy of the given identifiers",
"Collection",
"<",
"String",
">",
"validIdentifiers",
"=",
"new",
"ArrayL... | Filters the given collection of strings, returning a new collection
containing only those strings which are valid identifiers. If no strings
within the collection are valid identifiers, the returned collection will
simply be empty.
@param identifiers
The collection of strings to filter.
@return
A new collection conta... | [
"Filters",
"the",
"given",
"collection",
"of",
"strings",
"returning",
"a",
"new",
"collection",
"containing",
"only",
"those",
"strings",
"which",
"are",
"valid",
"identifiers",
".",
"If",
"no",
"strings",
"within",
"the",
"collection",
"are",
"valid",
"identif... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java#L350-L363 |
115,999 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java | ModeledDirectoryObjectService.getImplicitPermissions | protected Collection<ObjectPermissionModel> getImplicitPermissions(ModeledAuthenticatedUser user,
ModelType model) {
// Build list of implicit permissions
Collection<ObjectPermissionModel> implicitPermissions =
new ArrayList<ObjectPermissionModel>(IMPLICIT_OBJECT_PER... | java | protected Collection<ObjectPermissionModel> getImplicitPermissions(ModeledAuthenticatedUser user,
ModelType model) {
// Build list of implicit permissions
Collection<ObjectPermissionModel> implicitPermissions =
new ArrayList<ObjectPermissionModel>(IMPLICIT_OBJECT_PER... | [
"protected",
"Collection",
"<",
"ObjectPermissionModel",
">",
"getImplicitPermissions",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"ModelType",
"model",
")",
"{",
"// Build list of implicit permissions",
"Collection",
"<",
"ObjectPermissionModel",
">",
"implicitPermissions",... | Returns a collection of permissions that should be granted due to the
creation of the given object. These permissions need not be granted
solely to the user creating the object.
@param user
The user creating the object.
@param model
The object being created.
@return
The collection of implicit permissions that should... | [
"Returns",
"a",
"collection",
"of",
"permissions",
"that",
"should",
"be",
"granted",
"due",
"to",
"the",
"creation",
"of",
"the",
"given",
"object",
".",
"These",
"permissions",
"need",
"not",
"be",
"granted",
"solely",
"to",
"the",
"user",
"creating",
"the... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java#L427-L450 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.