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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
116,000 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/resource/WebApplicationResource.java | WebApplicationResource.getMimeType | private static String getMimeType(ServletContext context, String path) {
// If mimetype is known, use defined mimetype
String mimetype = context.getMimeType(path);
if (mimetype != null)
return mimetype;
// Otherwise, default to application/octet-stream
return "appli... | java | private static String getMimeType(ServletContext context, String path) {
// If mimetype is known, use defined mimetype
String mimetype = context.getMimeType(path);
if (mimetype != null)
return mimetype;
// Otherwise, default to application/octet-stream
return "appli... | [
"private",
"static",
"String",
"getMimeType",
"(",
"ServletContext",
"context",
",",
"String",
"path",
")",
"{",
"// If mimetype is known, use defined mimetype",
"String",
"mimetype",
"=",
"context",
".",
"getMimeType",
"(",
"path",
")",
";",
"if",
"(",
"mimetype",
... | Derives a mimetype from the filename within the given path using the
given ServletContext, if possible.
@param context
The ServletContext to use to derive the mimetype.
@param path
The path to derive the mimetype from.
@return
An appropriate mimetype based on the name of the file in the path,
or "application/octet-s... | [
"Derives",
"a",
"mimetype",
"from",
"the",
"filename",
"within",
"the",
"given",
"path",
"using",
"the",
"given",
"ServletContext",
"if",
"possible",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/resource/WebApplicationResource.java#L56-L66 |
116,001 | glyptodon/guacamole-client | extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/NonceService.java | NonceService.sweepExpiredNonces | private void sweepExpiredNonces() {
// Do not sweep until enough time has elapsed since the last sweep
long currentTime = System.currentTimeMillis();
if (currentTime - lastSweep < SWEEP_INTERVAL)
return;
// Record time of sweep
lastSweep = currentTime;
// F... | java | private void sweepExpiredNonces() {
// Do not sweep until enough time has elapsed since the last sweep
long currentTime = System.currentTimeMillis();
if (currentTime - lastSweep < SWEEP_INTERVAL)
return;
// Record time of sweep
lastSweep = currentTime;
// F... | [
"private",
"void",
"sweepExpiredNonces",
"(",
")",
"{",
"// Do not sweep until enough time has elapsed since the last sweep",
"long",
"currentTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"if",
"(",
"currentTime",
"-",
"lastSweep",
"<",
"SWEEP_INTERVAL",
... | Iterates through the entire Map of generated nonces, removing any nonce
that has exceeded its expiration timestamp. If insufficient time has
elapsed since the last sweep, as dictated by SWEEP_INTERVAL, this
function has no effect. | [
"Iterates",
"through",
"the",
"entire",
"Map",
"of",
"generated",
"nonces",
"removing",
"any",
"nonce",
"that",
"has",
"exceeded",
"its",
"expiration",
"timestamp",
".",
"If",
"insufficient",
"time",
"has",
"elapsed",
"since",
"the",
"last",
"sweep",
"as",
"di... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/NonceService.java#L65-L86 |
116,002 | glyptodon/guacamole-client | extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/NonceService.java | NonceService.generate | public String generate(long maxAge) {
// Sweep expired nonces if enough time has passed
sweepExpiredNonces();
// Generate and store nonce, along with expiration timestamp
String nonce = new BigInteger(130, random).toString(32);
nonces.put(nonce, System.currentTimeMillis() + max... | java | public String generate(long maxAge) {
// Sweep expired nonces if enough time has passed
sweepExpiredNonces();
// Generate and store nonce, along with expiration timestamp
String nonce = new BigInteger(130, random).toString(32);
nonces.put(nonce, System.currentTimeMillis() + max... | [
"public",
"String",
"generate",
"(",
"long",
"maxAge",
")",
"{",
"// Sweep expired nonces if enough time has passed",
"sweepExpiredNonces",
"(",
")",
";",
"// Generate and store nonce, along with expiration timestamp",
"String",
"nonce",
"=",
"new",
"BigInteger",
"(",
"130",
... | Generates a cryptographically-secure nonce value. The nonce is intended
to be used to prevent replay attacks.
@param maxAge
The maximum amount of time that the generated nonce should remain
valid, in milliseconds.
@return
A cryptographically-secure nonce value. | [
"Generates",
"a",
"cryptographically",
"-",
"secure",
"nonce",
"value",
".",
"The",
"nonce",
"is",
"intended",
"to",
"be",
"used",
"to",
"prevent",
"replay",
"attacks",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/NonceService.java#L99-L109 |
116,003 | glyptodon/guacamole-client | extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/NonceService.java | NonceService.isValid | public boolean isValid(String nonce) {
// Remove nonce, verifying whether it was present at all
Long expires = nonces.remove(nonce);
if (expires == null)
return false;
// Nonce is only valid if it hasn't expired
return expires > System.currentTimeMillis();
} | java | public boolean isValid(String nonce) {
// Remove nonce, verifying whether it was present at all
Long expires = nonces.remove(nonce);
if (expires == null)
return false;
// Nonce is only valid if it hasn't expired
return expires > System.currentTimeMillis();
} | [
"public",
"boolean",
"isValid",
"(",
"String",
"nonce",
")",
"{",
"// Remove nonce, verifying whether it was present at all",
"Long",
"expires",
"=",
"nonces",
".",
"remove",
"(",
"nonce",
")",
";",
"if",
"(",
"expires",
"==",
"null",
")",
"return",
"false",
";"... | Returns whether the give nonce value is valid. A nonce is valid if and
only if it was generated by this instance of the NonceService. Testing
nonce validity through this function immediately and permanently
invalidates that nonce.
@param nonce
The nonce value to test.
@return
true if the provided nonce is valid, fals... | [
"Returns",
"whether",
"the",
"give",
"nonce",
"value",
"is",
"valid",
".",
"A",
"nonce",
"is",
"valid",
"if",
"and",
"only",
"if",
"it",
"was",
"generated",
"by",
"this",
"instance",
"of",
"the",
"NonceService",
".",
"Testing",
"nonce",
"validity",
"throug... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/NonceService.java#L123-L133 |
116,004 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ConnectionService.java | ConnectionService.retrieveParameters | public Map<String, String> retrieveParameters(ModeledAuthenticatedUser user,
String identifier) {
Map<String, String> parameterMap = new HashMap<String, String>();
// Determine whether we have permission to read parameters
boolean canRetrieveParameters;
try {
ca... | java | public Map<String, String> retrieveParameters(ModeledAuthenticatedUser user,
String identifier) {
Map<String, String> parameterMap = new HashMap<String, String>();
// Determine whether we have permission to read parameters
boolean canRetrieveParameters;
try {
ca... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"retrieveParameters",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"String",
"identifier",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"parameterMap",
"=",
"new",
"HashMap",
"<",
"String",
",",
"St... | Retrieves all parameters visible to the given user and associated with
the connection having the given identifier. If the given user has no
access to such parameters, or no such connection exists, the returned
map will be empty.
@param user
The user retrieving connection parameters.
@param identifier
The identifier o... | [
"Retrieves",
"all",
"parameters",
"visible",
"to",
"the",
"given",
"user",
"and",
"associated",
"with",
"the",
"connection",
"having",
"the",
"given",
"identifier",
".",
"If",
"the",
"given",
"user",
"has",
"no",
"access",
"to",
"such",
"parameters",
"or",
"... | 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/ConnectionService.java#L329-L354 |
116,005 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ConnectionService.java | ConnectionService.getObjectInstances | protected List<ConnectionRecord> getObjectInstances(List<ConnectionRecordModel> models) {
// Create new list of records by manually converting each model
List<ConnectionRecord> objects = new ArrayList<ConnectionRecord>(models.size());
for (ConnectionRecordModel model : models)
objec... | java | protected List<ConnectionRecord> getObjectInstances(List<ConnectionRecordModel> models) {
// Create new list of records by manually converting each model
List<ConnectionRecord> objects = new ArrayList<ConnectionRecord>(models.size());
for (ConnectionRecordModel model : models)
objec... | [
"protected",
"List",
"<",
"ConnectionRecord",
">",
"getObjectInstances",
"(",
"List",
"<",
"ConnectionRecordModel",
">",
"models",
")",
"{",
"// Create new list of records by manually converting each model",
"List",
"<",
"ConnectionRecord",
">",
"objects",
"=",
"new",
"Ar... | Returns a list of connection records objects which are backed by the
models in the given list.
@param models
The model objects to use to back the connection record objects
within the returned list.
@return
A list of connection record objects which are backed by the models
in the given list. | [
"Returns",
"a",
"list",
"of",
"connection",
"records",
"objects",
"which",
"are",
"backed",
"by",
"the",
"models",
"in",
"the",
"given",
"list",
"."
] | 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/ConnectionService.java#L382-L391 |
116,006 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ConnectionService.java | ConnectionService.retrieveHistory | public List<ConnectionRecord> retrieveHistory(ModeledAuthenticatedUser user,
ModeledConnection connection) throws GuacamoleException {
String identifier = connection.getIdentifier();
// Retrieve history only if READ permission is granted
if (hasObjectPermission(user, identifier, Ob... | java | public List<ConnectionRecord> retrieveHistory(ModeledAuthenticatedUser user,
ModeledConnection connection) throws GuacamoleException {
String identifier = connection.getIdentifier();
// Retrieve history only if READ permission is granted
if (hasObjectPermission(user, identifier, Ob... | [
"public",
"List",
"<",
"ConnectionRecord",
">",
"retrieveHistory",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"ModeledConnection",
"connection",
")",
"throws",
"GuacamoleException",
"{",
"String",
"identifier",
"=",
"connection",
".",
"getIdentifier",
"(",
")",
";"... | Retrieves the connection history of the given connection, including any
active connections.
@param user
The user retrieving the connection history.
@param connection
The connection whose history is being retrieved.
@return
The connection history of the given connection, including any
active connections.
@throws Gua... | [
"Retrieves",
"the",
"connection",
"history",
"of",
"the",
"given",
"connection",
"including",
"any",
"active",
"connections",
"."
] | 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/ConnectionService.java#L410-L437 |
116,007 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ConnectionService.java | ConnectionService.connect | public GuacamoleTunnel connect(ModeledAuthenticatedUser user,
ModeledConnection connection, GuacamoleClientInformation info,
Map<String, String> tokens) throws GuacamoleException {
// Connect only if READ permission is granted
if (hasObjectPermission(user, connection.getIdentifi... | java | public GuacamoleTunnel connect(ModeledAuthenticatedUser user,
ModeledConnection connection, GuacamoleClientInformation info,
Map<String, String> tokens) throws GuacamoleException {
// Connect only if READ permission is granted
if (hasObjectPermission(user, connection.getIdentifi... | [
"public",
"GuacamoleTunnel",
"connect",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"ModeledConnection",
"connection",
",",
"GuacamoleClientInformation",
"info",
",",
"Map",
"<",
"String",
",",
"String",
">",
"tokens",
")",
"throws",
"GuacamoleException",
"{",
"// C... | Connects to the given connection as the given user, using the given
client information. If the user does not have permission to read the
connection, permission will be denied.
@param user
The user connecting to the connection.
@param connection
The connection being connected to.
@param info
Information associated wi... | [
"Connects",
"to",
"the",
"given",
"connection",
"as",
"the",
"given",
"user",
"using",
"the",
"given",
"client",
"information",
".",
"If",
"the",
"user",
"does",
"not",
"have",
"permission",
"to",
"read",
"the",
"connection",
"permission",
"will",
"be",
"den... | 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/ConnectionService.java#L513-L524 |
116,008 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/ModeledObjectPermissionService.java | ModeledObjectPermissionService.canAlterPermissions | protected boolean canAlterPermissions(ModeledAuthenticatedUser user,
ModeledPermissions<? extends EntityModel> targetEntity,
Collection<ObjectPermission> permissions)
throws GuacamoleException {
// A system adminstrator can do anything
if (user.getUser().isAdministra... | java | protected boolean canAlterPermissions(ModeledAuthenticatedUser user,
ModeledPermissions<? extends EntityModel> targetEntity,
Collection<ObjectPermission> permissions)
throws GuacamoleException {
// A system adminstrator can do anything
if (user.getUser().isAdministra... | [
"protected",
"boolean",
"canAlterPermissions",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"ModeledPermissions",
"<",
"?",
"extends",
"EntityModel",
">",
"targetEntity",
",",
"Collection",
"<",
"ObjectPermission",
">",
"permissions",
")",
"throws",
"GuacamoleException",... | Determines whether the current user has permission to update the given
target entity, adding or removing the given permissions. Such permission
depends on whether the current user is a system administrator, whether
they have explicit UPDATE permission on the target entity, and whether
they have explicit ADMINISTER perm... | [
"Determines",
"whether",
"the",
"current",
"user",
"has",
"permission",
"to",
"update",
"the",
"given",
"target",
"entity",
"adding",
"or",
"removing",
"the",
"given",
"permissions",
".",
"Such",
"permission",
"depends",
"on",
"whether",
"the",
"current",
"user"... | 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/ModeledObjectPermissionService.java#L93-L125 |
116,009 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java | ConfigurationService.getUsernameAttributes | public List<String> getUsernameAttributes() throws GuacamoleException {
return environment.getProperty(
LDAPGuacamoleProperties.LDAP_USERNAME_ATTRIBUTE,
Collections.singletonList("uid")
);
} | java | public List<String> getUsernameAttributes() throws GuacamoleException {
return environment.getProperty(
LDAPGuacamoleProperties.LDAP_USERNAME_ATTRIBUTE,
Collections.singletonList("uid")
);
} | [
"public",
"List",
"<",
"String",
">",
"getUsernameAttributes",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"environment",
".",
"getProperty",
"(",
"LDAPGuacamoleProperties",
".",
"LDAP_USERNAME_ATTRIBUTE",
",",
"Collections",
".",
"singletonList",
"(",
"\... | Returns all username attributes which should be used to query and bind
users using the LDAP directory. By default, this will be "uid" - a
common attribute used for this purpose.
@return
The username attributes which should be used to query and bind users
using the LDAP directory.
@throws GuacamoleException
If guacamo... | [
"Returns",
"all",
"username",
"attributes",
"which",
"should",
"be",
"used",
"to",
"query",
"and",
"bind",
"users",
"using",
"the",
"LDAP",
"directory",
".",
"By",
"default",
"this",
"will",
"be",
"uid",
"-",
"a",
"common",
"attribute",
"used",
"for",
"thi... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java#L97-L102 |
116,010 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java | ConfigurationService.getGroupNameAttributes | public List<String> getGroupNameAttributes() throws GuacamoleException {
return environment.getProperty(
LDAPGuacamoleProperties.LDAP_GROUP_NAME_ATTRIBUTE,
Collections.singletonList("cn")
);
} | java | public List<String> getGroupNameAttributes() throws GuacamoleException {
return environment.getProperty(
LDAPGuacamoleProperties.LDAP_GROUP_NAME_ATTRIBUTE,
Collections.singletonList("cn")
);
} | [
"public",
"List",
"<",
"String",
">",
"getGroupNameAttributes",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"environment",
".",
"getProperty",
"(",
"LDAPGuacamoleProperties",
".",
"LDAP_GROUP_NAME_ATTRIBUTE",
",",
"Collections",
".",
"singletonList",
"(",
... | Returns all attributes which should be used to determine the unique
identifier of each user group. By default, this will be "cn".
@return
The attributes which should be used to determine the unique
identifier of each group.
@throws GuacamoleException
If guacamole.properties cannot be parsed. | [
"Returns",
"all",
"attributes",
"which",
"should",
"be",
"used",
"to",
"determine",
"the",
"unique",
"identifier",
"of",
"each",
"user",
"group",
".",
"By",
"default",
"this",
"will",
"be",
"cn",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java#L152-L157 |
116,011 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java | ConfigurationService.getLDAPSearchConstraints | public LDAPSearchConstraints getLDAPSearchConstraints() throws GuacamoleException {
LDAPSearchConstraints constraints = new LDAPSearchConstraints();
constraints.setMaxResults(getMaxResults());
constraints.setDereference(getDereferenceAliases().DEREF_VALUE);
return constraints;
} | java | public LDAPSearchConstraints getLDAPSearchConstraints() throws GuacamoleException {
LDAPSearchConstraints constraints = new LDAPSearchConstraints();
constraints.setMaxResults(getMaxResults());
constraints.setDereference(getDereferenceAliases().DEREF_VALUE);
return constraints;
} | [
"public",
"LDAPSearchConstraints",
"getLDAPSearchConstraints",
"(",
")",
"throws",
"GuacamoleException",
"{",
"LDAPSearchConstraints",
"constraints",
"=",
"new",
"LDAPSearchConstraints",
"(",
")",
";",
"constraints",
".",
"setMaxResults",
"(",
"getMaxResults",
"(",
")",
... | Returns a set of LDAPSearchConstraints to apply globally
to all LDAP searches.
@return
A LDAPSearchConstraints object containing constraints
to be applied to all LDAP search operations.
@throws GuacamoleException
If guacamole.properties cannot be parsed. | [
"Returns",
"a",
"set",
"of",
"LDAPSearchConstraints",
"to",
"apply",
"globally",
"to",
"all",
"LDAP",
"searches",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java#L301-L309 |
116,012 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java | ConfigurationService.getAttributes | public List<String> getAttributes() throws GuacamoleException {
return environment.getProperty(
LDAPGuacamoleProperties.LDAP_USER_ATTRIBUTES,
Collections.<String>emptyList()
);
} | java | public List<String> getAttributes() throws GuacamoleException {
return environment.getProperty(
LDAPGuacamoleProperties.LDAP_USER_ATTRIBUTES,
Collections.<String>emptyList()
);
} | [
"public",
"List",
"<",
"String",
">",
"getAttributes",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"environment",
".",
"getProperty",
"(",
"LDAPGuacamoleProperties",
".",
"LDAP_USER_ATTRIBUTES",
",",
"Collections",
".",
"<",
"String",
">",
"emptyList",
... | Returns names for custom LDAP user attributes.
@return
Custom LDAP user attributes as configured in guacamole.properties.
@throws GuacamoleException
If guacamole.properties cannot be parsed. | [
"Returns",
"names",
"for",
"custom",
"LDAP",
"user",
"attributes",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java#L374-L379 |
116,013 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingFilter.java | StreamInterceptingFilter.interceptStream | public void interceptStream(int index, T stream) throws GuacamoleException {
InterceptedStream<T> interceptedStream;
String indexString = Integer.toString(index);
// Atomically verify tunnel is open and add the given stream
synchronized (tunnel) {
// Do nothing if tunnel i... | java | public void interceptStream(int index, T stream) throws GuacamoleException {
InterceptedStream<T> interceptedStream;
String indexString = Integer.toString(index);
// Atomically verify tunnel is open and add the given stream
synchronized (tunnel) {
// Do nothing if tunnel i... | [
"public",
"void",
"interceptStream",
"(",
"int",
"index",
",",
"T",
"stream",
")",
"throws",
"GuacamoleException",
"{",
"InterceptedStream",
"<",
"T",
">",
"interceptedStream",
";",
"String",
"indexString",
"=",
"Integer",
".",
"toString",
"(",
"index",
")",
"... | Intercept the stream having the given index, producing or consuming its
data as appropriate. The given stream object will automatically be closed
when the stream ends. If there is no stream having the given index, then
the stream object will be closed immediately. This function will block
until all data has been handle... | [
"Intercept",
"the",
"stream",
"having",
"the",
"given",
"index",
"producing",
"or",
"consuming",
"its",
"data",
"as",
"appropriate",
".",
"The",
"given",
"stream",
"object",
"will",
"automatically",
"be",
"closed",
"when",
"the",
"stream",
"ends",
".",
"If",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingFilter.java#L185-L215 |
116,014 | glyptodon/guacamole-client | extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/api/DuoCookie.java | DuoCookie.parseDuoCookie | public static DuoCookie parseDuoCookie(String str) throws GuacamoleException {
// Attempt to decode data as base64
String data;
try {
data = new String(BaseEncoding.base64().decode(str), "UTF-8");
}
// Bail if invalid base64 is provided
catch (IllegalArgumen... | java | public static DuoCookie parseDuoCookie(String str) throws GuacamoleException {
// Attempt to decode data as base64
String data;
try {
data = new String(BaseEncoding.base64().decode(str), "UTF-8");
}
// Bail if invalid base64 is provided
catch (IllegalArgumen... | [
"public",
"static",
"DuoCookie",
"parseDuoCookie",
"(",
"String",
"str",
")",
"throws",
"GuacamoleException",
"{",
"// Attempt to decode data as base64",
"String",
"data",
";",
"try",
"{",
"data",
"=",
"new",
"String",
"(",
"BaseEncoding",
".",
"base64",
"(",
")",... | Parses a base64-encoded Duo cookie, producing a new DuoCookie object
containing the data therein. If the given string is not a valid Duo
cookie, an exception is thrown. Note that the cookie may be expired, and
must be checked for expiration prior to actual use.
@param str
The base64-encoded Duo cookie to parse.
@retu... | [
"Parses",
"a",
"base64",
"-",
"encoded",
"Duo",
"cookie",
"producing",
"a",
"new",
"DuoCookie",
"object",
"containing",
"the",
"data",
"therein",
".",
"If",
"the",
"given",
"string",
"is",
"not",
"a",
"valid",
"Duo",
"cookie",
"an",
"exception",
"is",
"thr... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/api/DuoCookie.java#L169-L214 |
116,015 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java | ModeledUser.init | public void init(ModeledAuthenticatedUser currentUser, UserModel model,
boolean exposeRestrictedAttributes) {
super.init(currentUser, model);
this.exposeRestrictedAttributes = exposeRestrictedAttributes;
} | java | public void init(ModeledAuthenticatedUser currentUser, UserModel model,
boolean exposeRestrictedAttributes) {
super.init(currentUser, model);
this.exposeRestrictedAttributes = exposeRestrictedAttributes;
} | [
"public",
"void",
"init",
"(",
"ModeledAuthenticatedUser",
"currentUser",
",",
"UserModel",
"model",
",",
"boolean",
"exposeRestrictedAttributes",
")",
"{",
"super",
".",
"init",
"(",
"currentUser",
",",
"model",
")",
";",
"this",
".",
"exposeRestrictedAttributes",
... | Initializes this ModeledUser, associating it with the current
authenticated user and populating it with data from the given user
model.
@param currentUser
The user that created or retrieved this object.
@param model
The backing model object.
@param exposeRestrictedAttributes
Whether attributes which control access r... | [
"Initializes",
"this",
"ModeledUser",
"associating",
"it",
"with",
"the",
"current",
"authenticated",
"user",
"and",
"populating",
"it",
"with",
"data",
"from",
"the",
"given",
"user",
"model",
"."
] | 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/user/ModeledUser.java#L208-L212 |
116,016 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java | ModeledUser.asCalendar | private Calendar asCalendar(Calendar base, Time time) {
// Get calendar from given SQL time
Calendar timeCalendar = Calendar.getInstance();
timeCalendar.setTime(time);
// Apply given time to base calendar
base.set(Calendar.HOUR_OF_DAY, timeCalendar.get(Calendar.HOUR_OF_DAY));
... | java | private Calendar asCalendar(Calendar base, Time time) {
// Get calendar from given SQL time
Calendar timeCalendar = Calendar.getInstance();
timeCalendar.setTime(time);
// Apply given time to base calendar
base.set(Calendar.HOUR_OF_DAY, timeCalendar.get(Calendar.HOUR_OF_DAY));
... | [
"private",
"Calendar",
"asCalendar",
"(",
"Calendar",
"base",
",",
"Time",
"time",
")",
"{",
"// Get calendar from given SQL time",
"Calendar",
"timeCalendar",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"timeCalendar",
".",
"setTime",
"(",
"time",
")",
... | Converts a SQL Time to a Calendar, independently of time zone, using the
given Calendar as a base. The time components will be copied to the
given Calendar verbatim, leaving the date and time zone components of
the given Calendar otherwise intact.
@param base
The Calendar object to use as a base for the conversion.
@... | [
"Converts",
"a",
"SQL",
"Time",
"to",
"a",
"Calendar",
"independently",
"of",
"time",
"zone",
"using",
"the",
"given",
"Calendar",
"as",
"a",
"base",
".",
"The",
"time",
"components",
"will",
"be",
"copied",
"to",
"the",
"given",
"Calendar",
"verbatim",
"l... | 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/user/ModeledUser.java#L554-L568 |
116,017 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java | ModeledUser.getAccessWindowStart | private Calendar getAccessWindowStart() {
// Get window start time
Time start = getModel().getAccessWindowStart();
if (start == null)
return null;
// Return within defined time zone, current day
return asCalendar(Calendar.getInstance(getTimeZone()), start);
} | java | private Calendar getAccessWindowStart() {
// Get window start time
Time start = getModel().getAccessWindowStart();
if (start == null)
return null;
// Return within defined time zone, current day
return asCalendar(Calendar.getInstance(getTimeZone()), start);
} | [
"private",
"Calendar",
"getAccessWindowStart",
"(",
")",
"{",
"// Get window start time",
"Time",
"start",
"=",
"getModel",
"(",
")",
".",
"getAccessWindowStart",
"(",
")",
";",
"if",
"(",
"start",
"==",
"null",
")",
"return",
"null",
";",
"// Return within defi... | Returns the time during the current day when this user account can start
being used.
@return
The time during the current day when this user account can start
being used. | [
"Returns",
"the",
"time",
"during",
"the",
"current",
"day",
"when",
"this",
"user",
"account",
"can",
"start",
"being",
"used",
"."
] | 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/user/ModeledUser.java#L578-L588 |
116,018 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java | ModeledUser.getAccessWindowEnd | private Calendar getAccessWindowEnd() {
// Get window end time
Time end = getModel().getAccessWindowEnd();
if (end == null)
return null;
// Return within defined time zone, current day
return asCalendar(Calendar.getInstance(getTimeZone()), end);
} | java | private Calendar getAccessWindowEnd() {
// Get window end time
Time end = getModel().getAccessWindowEnd();
if (end == null)
return null;
// Return within defined time zone, current day
return asCalendar(Calendar.getInstance(getTimeZone()), end);
} | [
"private",
"Calendar",
"getAccessWindowEnd",
"(",
")",
"{",
"// Get window end time",
"Time",
"end",
"=",
"getModel",
"(",
")",
".",
"getAccessWindowEnd",
"(",
")",
";",
"if",
"(",
"end",
"==",
"null",
")",
"return",
"null",
";",
"// Return within defined time z... | Returns the time during the current day when this user account can no
longer be used.
@return
The time during the current day when this user account can no longer
be used. | [
"Returns",
"the",
"time",
"during",
"the",
"current",
"day",
"when",
"this",
"user",
"account",
"can",
"no",
"longer",
"be",
"used",
"."
] | 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/user/ModeledUser.java#L598-L608 |
116,019 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java | ModeledUser.getValidFrom | private Calendar getValidFrom() {
// Get valid from date
Date validFrom = getModel().getValidFrom();
if (validFrom == null)
return null;
// Convert to midnight within defined time zone
Calendar validFromCalendar = Calendar.getInstance(getTimeZone());
validFr... | java | private Calendar getValidFrom() {
// Get valid from date
Date validFrom = getModel().getValidFrom();
if (validFrom == null)
return null;
// Convert to midnight within defined time zone
Calendar validFromCalendar = Calendar.getInstance(getTimeZone());
validFr... | [
"private",
"Calendar",
"getValidFrom",
"(",
")",
"{",
"// Get valid from date",
"Date",
"validFrom",
"=",
"getModel",
"(",
")",
".",
"getValidFrom",
"(",
")",
";",
"if",
"(",
"validFrom",
"==",
"null",
")",
"return",
"null",
";",
"// Convert to midnight within d... | Returns the date after which this account becomes valid. The time
components of the resulting Calendar object will be set to midnight of
the date in question.
@return
The date after which this account becomes valid. | [
"Returns",
"the",
"date",
"after",
"which",
"this",
"account",
"becomes",
"valid",
".",
"The",
"time",
"components",
"of",
"the",
"resulting",
"Calendar",
"object",
"will",
"be",
"set",
"to",
"midnight",
"of",
"the",
"date",
"in",
"question",
"."
] | 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/user/ModeledUser.java#L618-L634 |
116,020 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java | ModeledUser.isActive | private boolean isActive(Calendar activeStart, Calendar inactiveStart) {
// If end occurs before start, convert to equivalent case where start
// start is before end
if (inactiveStart != null && activeStart != null && inactiveStart.before(activeStart))
return !isActive(inactiveStart... | java | private boolean isActive(Calendar activeStart, Calendar inactiveStart) {
// If end occurs before start, convert to equivalent case where start
// start is before end
if (inactiveStart != null && activeStart != null && inactiveStart.before(activeStart))
return !isActive(inactiveStart... | [
"private",
"boolean",
"isActive",
"(",
"Calendar",
"activeStart",
",",
"Calendar",
"inactiveStart",
")",
"{",
"// If end occurs before start, convert to equivalent case where start",
"// start is before end",
"if",
"(",
"inactiveStart",
"!=",
"null",
"&&",
"activeStart",
"!="... | Given a time when a particular state changes from inactive to active,
and a time when a particular state changes from active to inactive,
determines whether that state is currently active.
@param activeStart
The time at which the state changes from inactive to active.
@param inactiveStart
The time at which the state ... | [
"Given",
"a",
"time",
"when",
"a",
"particular",
"state",
"changes",
"from",
"inactive",
"to",
"active",
"and",
"a",
"time",
"when",
"a",
"particular",
"state",
"changes",
"from",
"active",
"to",
"inactive",
"determines",
"whether",
"that",
"state",
"is",
"c... | 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/user/ModeledUser.java#L676-L690 |
116,021 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connectiongroup/ModeledConnectionGroup.java | ModeledConnectionGroup.getMaxConnections | public int getMaxConnections() throws GuacamoleException {
// Pull default from environment if connection limit is unset
Integer value = getModel().getMaxConnections();
if (value == null)
return environment.getDefaultMaxGroupConnections();
// 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.getDefaultMaxGroupConnections();
// 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 group overall. If no limit applies, zero is returned.
@return
The maximum number of connections that should be allowed to this
connection group overall, or zero if no limit applies.
@throws GuacamoleException
If an error occurs while ... | [
"Returns",
"the",
"maximum",
"number",
"of",
"connections",
"that",
"should",
"be",
"allowed",
"to",
"this",
"connection",
"group",
"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/connectiongroup/ModeledConnectionGroup.java#L232-L242 |
116,022 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connectiongroup/ModeledConnectionGroup.java | ModeledConnectionGroup.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.getDefaultMaxGroupConnectionsPerUser();
// O... | 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.getDefaultMaxGroupConnectionsPerUser();
// O... | [
"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 group for any individual user. If no limit applies, zero is
returned.
@return
The maximum number of connections that should be allowed to this
connection group for any individual user, or zero if no limit
applies.
@throws GuacamoleExc... | [
"Returns",
"the",
"maximum",
"number",
"of",
"connections",
"that",
"should",
"be",
"allowed",
"to",
"this",
"connection",
"group",
"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/connectiongroup/ModeledConnectionGroup.java#L258-L268 |
116,023 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/GuacamoleSession.java | GuacamoleSession.getUserContext | public DecoratedUserContext getUserContext(String authProviderIdentifier)
throws GuacamoleException {
// Locate and return the UserContext associated with the
// AuthenticationProvider having the given identifier, if any
for (DecoratedUserContext userContext : getUserContexts()) {
... | java | public DecoratedUserContext getUserContext(String authProviderIdentifier)
throws GuacamoleException {
// Locate and return the UserContext associated with the
// AuthenticationProvider having the given identifier, if any
for (DecoratedUserContext userContext : getUserContexts()) {
... | [
"public",
"DecoratedUserContext",
"getUserContext",
"(",
"String",
"authProviderIdentifier",
")",
"throws",
"GuacamoleException",
"{",
"// Locate and return the UserContext associated with the",
"// AuthenticationProvider having the given identifier, if any",
"for",
"(",
"DecoratedUserCo... | Returns the UserContext associated with this session that originated
from the AuthenticationProvider with the given identifier. If no such
UserContext exists, an exception is thrown.
@param authProviderIdentifier
The unique identifier of the AuthenticationProvider that created the
UserContext being retrieved.
@return... | [
"Returns",
"the",
"UserContext",
"associated",
"with",
"this",
"session",
"that",
"originated",
"from",
"the",
"AuthenticationProvider",
"with",
"the",
"given",
"identifier",
".",
"If",
"no",
"such",
"UserContext",
"exists",
"an",
"exception",
"is",
"thrown",
"."
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/GuacamoleSession.java#L145-L165 |
116,024 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/GuacamoleSession.java | GuacamoleSession.invalidate | public void invalidate() {
// Close all associated tunnels, if possible
for (GuacamoleTunnel tunnel : tunnels.values()) {
try {
tunnel.close();
}
catch (GuacamoleException e) {
logger.debug("Unable to close tunnel.", e);
}
... | java | public void invalidate() {
// Close all associated tunnels, if possible
for (GuacamoleTunnel tunnel : tunnels.values()) {
try {
tunnel.close();
}
catch (GuacamoleException e) {
logger.debug("Unable to close tunnel.", e);
}
... | [
"public",
"void",
"invalidate",
"(",
")",
"{",
"// Close all associated tunnels, if possible",
"for",
"(",
"GuacamoleTunnel",
"tunnel",
":",
"tunnels",
".",
"values",
"(",
")",
")",
"{",
"try",
"{",
"tunnel",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
... | Closes all associated tunnels and prevents any further use of this
session. | [
"Closes",
"all",
"associated",
"tunnels",
"and",
"prevents",
"any",
"further",
"use",
"of",
"this",
"session",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/GuacamoleSession.java#L244-L263 |
116,025 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/form/NumericField.java | NumericField.parse | public static Integer parse(String str) throws NumberFormatException {
// Return null if no value provided
if (str == null || str.isEmpty())
return null;
// Parse as integer
return Integer.valueOf(str);
} | java | public static Integer parse(String str) throws NumberFormatException {
// Return null if no value provided
if (str == null || str.isEmpty())
return null;
// Parse as integer
return Integer.valueOf(str);
} | [
"public",
"static",
"Integer",
"parse",
"(",
"String",
"str",
")",
"throws",
"NumberFormatException",
"{",
"// Return null if no value provided",
"if",
"(",
"str",
"==",
"null",
"||",
"str",
".",
"isEmpty",
"(",
")",
")",
"return",
"null",
";",
"// Parse as inte... | Parses the given string as an integer, where the given string is in the
format required by a numeric field.
@param str
The string to parse as an integer, which may be null.
@return
The integer representation of the given string, or null if the given
string was null.
@throws NumberFormatException
If the given string ... | [
"Parses",
"the",
"given",
"string",
"as",
"an",
"integer",
"where",
"the",
"given",
"string",
"is",
"in",
"the",
"format",
"required",
"by",
"a",
"numeric",
"field",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/form/NumericField.java#L72-L81 |
116,026 | glyptodon/guacamole-client | guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java | GuacamoleHTTPTunnelServlet.sendError | protected void sendError(HttpServletResponse response, int guacamoleStatusCode,
int guacamoleHttpCode, String message)
throws ServletException {
try {
// If response not committed, send error code and message
if (!response.isCommitted()) {
respon... | java | protected void sendError(HttpServletResponse response, int guacamoleStatusCode,
int guacamoleHttpCode, String message)
throws ServletException {
try {
// If response not committed, send error code and message
if (!response.isCommitted()) {
respon... | [
"protected",
"void",
"sendError",
"(",
"HttpServletResponse",
"response",
",",
"int",
"guacamoleStatusCode",
",",
"int",
"guacamoleHttpCode",
",",
"String",
"message",
")",
"throws",
"ServletException",
"{",
"try",
"{",
"// If response not committed, send error code and mes... | Sends an error on the given HTTP response using the information within
the given GuacamoleStatus.
@param response
The HTTP response to use to send the error.
@param guacamoleStatusCode
The GuacamoleStatus code to send.
@param guacamoleHttpCode
The numeric HTTP code to send.
@param message
The human-readable error m... | [
"Sends",
"an",
"error",
"on",
"the",
"given",
"HTTP",
"response",
"using",
"the",
"information",
"within",
"the",
"given",
"GuacamoleStatus",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java#L164-L186 |
116,027 | glyptodon/guacamole-client | guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java | GuacamoleHTTPTunnelServlet.handleTunnelRequest | protected void handleTunnelRequest(HttpServletRequest request,
HttpServletResponse response) throws ServletException {
try {
String query = request.getQueryString();
if (query == null)
throw new GuacamoleClientException("No query string provided.");
... | java | protected void handleTunnelRequest(HttpServletRequest request,
HttpServletResponse response) throws ServletException {
try {
String query = request.getQueryString();
if (query == null)
throw new GuacamoleClientException("No query string provided.");
... | [
"protected",
"void",
"handleTunnelRequest",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"ServletException",
"{",
"try",
"{",
"String",
"query",
"=",
"request",
".",
"getQueryString",
"(",
")",
";",
"if",
"(",
"query... | Dispatches every HTTP GET and POST request to the appropriate handler
function based on the query string.
@param request
The HttpServletRequest associated with the GET or POST request
received.
@param response
The HttpServletResponse associated with the GET or POST request
received.
@throws ServletException
If an er... | [
"Dispatches",
"every",
"HTTP",
"GET",
"and",
"POST",
"request",
"to",
"the",
"appropriate",
"handler",
"function",
"based",
"on",
"the",
"query",
"string",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java#L203-L274 |
116,028 | glyptodon/guacamole-client | guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java | GuacamoleHTTPTunnelServlet.doRead | protected void doRead(HttpServletRequest request,
HttpServletResponse response, String tunnelUUID)
throws GuacamoleException {
// Get tunnel, ensure tunnel exists
GuacamoleTunnel tunnel = getTunnel(tunnelUUID);
// Ensure tunnel is open
if (!tunnel.isOpen())
... | java | protected void doRead(HttpServletRequest request,
HttpServletResponse response, String tunnelUUID)
throws GuacamoleException {
// Get tunnel, ensure tunnel exists
GuacamoleTunnel tunnel = getTunnel(tunnelUUID);
// Ensure tunnel is open
if (!tunnel.isOpen())
... | [
"protected",
"void",
"doRead",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"String",
"tunnelUUID",
")",
"throws",
"GuacamoleException",
"{",
"// Get tunnel, ensure tunnel exists",
"GuacamoleTunnel",
"tunnel",
"=",
"getTunnel",
"(",
"... | Called whenever the JavaScript Guacamole client makes a read request.
This function should in general not be overridden, as it already
contains a proper implementation of the read operation.
@param request
The HttpServletRequest associated with the read request received.
@param response
The HttpServletResponse associ... | [
"Called",
"whenever",
"the",
"JavaScript",
"Guacamole",
"client",
"makes",
"a",
"read",
"request",
".",
"This",
"function",
"should",
"in",
"general",
"not",
"be",
"overridden",
"as",
"it",
"already",
"contains",
"a",
"proper",
"implementation",
"of",
"the",
"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java#L319-L427 |
116,029 | glyptodon/guacamole-client | guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java | GuacamoleHTTPTunnelServlet.doWrite | protected void doWrite(HttpServletRequest request,
HttpServletResponse response, String tunnelUUID)
throws GuacamoleException {
GuacamoleTunnel tunnel = getTunnel(tunnelUUID);
// We still need to set the content type to avoid the default of
// text/html, as such a conte... | java | protected void doWrite(HttpServletRequest request,
HttpServletResponse response, String tunnelUUID)
throws GuacamoleException {
GuacamoleTunnel tunnel = getTunnel(tunnelUUID);
// We still need to set the content type to avoid the default of
// text/html, as such a conte... | [
"protected",
"void",
"doWrite",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"String",
"tunnelUUID",
")",
"throws",
"GuacamoleException",
"{",
"GuacamoleTunnel",
"tunnel",
"=",
"getTunnel",
"(",
"tunnelUUID",
")",
";",
"// We stil... | Called whenever the JavaScript Guacamole client makes a write request.
This function should in general not be overridden, as it already
contains a proper implementation of the write operation.
@param request
The HttpServletRequest associated with the write request received.
Any data to be written will be specified wit... | [
"Called",
"whenever",
"the",
"JavaScript",
"Guacamole",
"client",
"makes",
"a",
"write",
"request",
".",
"This",
"function",
"should",
"in",
"general",
"not",
"be",
"overridden",
"as",
"it",
"already",
"contains",
"a",
"proper",
"implementation",
"of",
"the",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java#L450-L510 |
116,030 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/form/TextField.java | TextField.parse | public static String parse(String str) {
// Return null if no value provided
if (str == null || str.isEmpty())
return null;
// Otherwise, return string unmodified
return str;
} | java | public static String parse(String str) {
// Return null if no value provided
if (str == null || str.isEmpty())
return null;
// Otherwise, return string unmodified
return str;
} | [
"public",
"static",
"String",
"parse",
"(",
"String",
"str",
")",
"{",
"// Return null if no value provided",
"if",
"(",
"str",
"==",
"null",
"||",
"str",
".",
"isEmpty",
"(",
")",
")",
"return",
"null",
";",
"// Otherwise, return string unmodified",
"return",
"... | Parses the given string, interpreting empty strings as equivalent to
null. For all other cases, the given string is returned verbatim.
@param str
The string to parse, which may be null.
@return
The given string, or null if the given string was null or empty. | [
"Parses",
"the",
"given",
"string",
"interpreting",
"empty",
"strings",
"as",
"equivalent",
"to",
"null",
".",
"For",
"all",
"other",
"cases",
"the",
"given",
"string",
"is",
"returned",
"verbatim",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/form/TextField.java#L65-L74 |
116,031 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/identifier/RelatedObjectSetPatch.java | RelatedObjectSetPatch.apply | public void apply(RelatedObjectSet objects) throws GuacamoleException {
// Add any added identifiers
if (!addedObjects.isEmpty())
objects.addObjects(addedObjects);
// Remove any removed identifiers
if (!removedObjects.isEmpty())
objects.removeObjects(removedObje... | java | public void apply(RelatedObjectSet objects) throws GuacamoleException {
// Add any added identifiers
if (!addedObjects.isEmpty())
objects.addObjects(addedObjects);
// Remove any removed identifiers
if (!removedObjects.isEmpty())
objects.removeObjects(removedObje... | [
"public",
"void",
"apply",
"(",
"RelatedObjectSet",
"objects",
")",
"throws",
"GuacamoleException",
"{",
"// Add any added identifiers",
"if",
"(",
"!",
"addedObjects",
".",
"isEmpty",
"(",
")",
")",
"objects",
".",
"addObjects",
"(",
"addedObjects",
")",
";",
"... | Applies all queued changes to the given RelatedObjectSet.
@param objects
The RelatedObjectSet to add and/or remove objects from.
@throws GuacamoleException
If any add or remove operation is disallowed by the underlying
RelatedObjectSet. | [
"Applies",
"all",
"queued",
"changes",
"to",
"the",
"given",
"RelatedObjectSet",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/identifier/RelatedObjectSetPatch.java#L77-L87 |
116,032 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/LDAPUserContext.java | LDAPUserContext.init | public void init(AuthenticatedUser user, LDAPConnection ldapConnection)
throws GuacamoleException {
// Query all accessible users
userDirectory = new SimpleDirectory<>(
userService.getUsers(ldapConnection)
);
// Query all accessible user groups
userGroup... | java | public void init(AuthenticatedUser user, LDAPConnection ldapConnection)
throws GuacamoleException {
// Query all accessible users
userDirectory = new SimpleDirectory<>(
userService.getUsers(ldapConnection)
);
// Query all accessible user groups
userGroup... | [
"public",
"void",
"init",
"(",
"AuthenticatedUser",
"user",
",",
"LDAPConnection",
"ldapConnection",
")",
"throws",
"GuacamoleException",
"{",
"// Query all accessible users",
"userDirectory",
"=",
"new",
"SimpleDirectory",
"<>",
"(",
"userService",
".",
"getUsers",
"("... | Initializes this UserContext using the provided AuthenticatedUser and
LDAPConnection.
@param user
The AuthenticatedUser representing the user that authenticated. This
user may have been authenticated by a different authentication
provider (not LDAP).
@param ldapConnection
The connection to the LDAP server to use when... | [
"Initializes",
"this",
"UserContext",
"using",
"the",
"provided",
"AuthenticatedUser",
"and",
"LDAPConnection",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/LDAPUserContext.java#L127-L178 |
116,033 | glyptodon/guacamole-client | extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java | AuthenticationCodeField.getKeyURI | @JsonProperty("keyUri")
public URI getKeyURI() throws GuacamoleException {
// Do not generate a key URI if no key is being exposed
if (key == null)
return null;
// Format "otpauth" URL (see https://github.com/google/google-authenticator/wiki/Key-Uri-Format)
String issue... | java | @JsonProperty("keyUri")
public URI getKeyURI() throws GuacamoleException {
// Do not generate a key URI if no key is being exposed
if (key == null)
return null;
// Format "otpauth" URL (see https://github.com/google/google-authenticator/wiki/Key-Uri-Format)
String issue... | [
"@",
"JsonProperty",
"(",
"\"keyUri\"",
")",
"public",
"URI",
"getKeyURI",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Do not generate a key URI if no key is being exposed",
"if",
"(",
"key",
"==",
"null",
")",
"return",
"null",
";",
"// Format \"otpauth\" URL (s... | Returns the "otpauth" URI for the secret key used to generate TOTP codes
for the current user. If the secret key is not being exposed to
facilitate enrollment, null is returned.
@return
The "otpauth" URI for the secret key used to generate TOTP codes
for the current user, or null is the secret ket is not being exposed... | [
"Returns",
"the",
"otpauth",
"URI",
"for",
"the",
"secret",
"key",
"used",
"to",
"generate",
"TOTP",
"codes",
"for",
"the",
"current",
"user",
".",
"If",
"the",
"secret",
"key",
"is",
"not",
"being",
"exposed",
"to",
"facilitate",
"enrollment",
"null",
"is... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java#L245-L263 |
116,034 | glyptodon/guacamole-client | extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java | AuthenticationCodeField.getQRCode | @JsonProperty("qrCode")
public String getQRCode() throws GuacamoleException {
// Do not generate a QR code if no key is being exposed
URI keyURI = getKeyURI();
if (keyURI == null)
return null;
ByteArrayOutputStream stream = new ByteArrayOutputStream();
try {
... | java | @JsonProperty("qrCode")
public String getQRCode() throws GuacamoleException {
// Do not generate a QR code if no key is being exposed
URI keyURI = getKeyURI();
if (keyURI == null)
return null;
ByteArrayOutputStream stream = new ByteArrayOutputStream();
try {
... | [
"@",
"JsonProperty",
"(",
"\"qrCode\"",
")",
"public",
"String",
"getQRCode",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Do not generate a QR code if no key is being exposed",
"URI",
"keyURI",
"=",
"getKeyURI",
"(",
")",
";",
"if",
"(",
"keyURI",
"==",
"null... | Returns the URL of a QR code describing the user's TOTP key and
configuration. If the key is not being exposed for enrollment, null is
returned.
@return
The URL of a QR code describing the user's TOTP key and
configuration, or null if the key is not being exposed for
enrollment.
@throws GuacamoleException
If the conf... | [
"Returns",
"the",
"URL",
"of",
"a",
"QR",
"code",
"describing",
"the",
"user",
"s",
"TOTP",
"key",
"and",
"configuration",
".",
"If",
"the",
"key",
"is",
"not",
"being",
"exposed",
"for",
"enrollment",
"null",
"is",
"returned",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java#L279-L313 |
116,035 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/InputStreamInterceptingFilter.java | InputStreamInterceptingFilter.sendBlob | private void sendBlob(String index, byte[] blob) {
// Send "blob" containing provided data
sendInstruction(new GuacamoleInstruction("blob", index,
BaseEncoding.base64().encode(blob)));
} | java | private void sendBlob(String index, byte[] blob) {
// Send "blob" containing provided data
sendInstruction(new GuacamoleInstruction("blob", index,
BaseEncoding.base64().encode(blob)));
} | [
"private",
"void",
"sendBlob",
"(",
"String",
"index",
",",
"byte",
"[",
"]",
"blob",
")",
"{",
"// Send \"blob\" containing provided data",
"sendInstruction",
"(",
"new",
"GuacamoleInstruction",
"(",
"\"blob\"",
",",
"index",
",",
"BaseEncoding",
".",
"base64",
"... | Injects a "blob" instruction into the outbound Guacamole protocol
stream, as if sent by the connected client. "blob" instructions are used
to send chunks of data along a stream.
@param index
The index of the stream that this "blob" instruction relates to.
@param blob
The chunk of data to send within the "blob" instru... | [
"Injects",
"a",
"blob",
"instruction",
"into",
"the",
"outbound",
"Guacamole",
"protocol",
"stream",
"as",
"if",
"sent",
"by",
"the",
"connected",
"client",
".",
"blob",
"instructions",
"are",
"used",
"to",
"send",
"chunks",
"of",
"data",
"along",
"a",
"stre... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/InputStreamInterceptingFilter.java#L74-L80 |
116,036 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/InputStreamInterceptingFilter.java | InputStreamInterceptingFilter.readNextBlob | private void readNextBlob(InterceptedStream<InputStream> stream) {
// Read blob from stream if it exists
try {
// Read raw data from input stream
byte[] blob = new byte[6048];
int length = stream.getStream().read(blob);
// End stream if no more data
... | java | private void readNextBlob(InterceptedStream<InputStream> stream) {
// Read blob from stream if it exists
try {
// Read raw data from input stream
byte[] blob = new byte[6048];
int length = stream.getStream().read(blob);
// End stream if no more data
... | [
"private",
"void",
"readNextBlob",
"(",
"InterceptedStream",
"<",
"InputStream",
">",
"stream",
")",
"{",
"// Read blob from stream if it exists",
"try",
"{",
"// Read raw data from input stream",
"byte",
"[",
"]",
"blob",
"=",
"new",
"byte",
"[",
"6048",
"]",
";",
... | Reads the next chunk of data from the InputStream associated with an
intercepted stream, sending that data as a "blob" instruction over the
GuacamoleTunnel associated with this filter. If the end of the
InputStream is reached, an "end" instruction will automatically be sent.
@param stream
The stream from which the nex... | [
"Reads",
"the",
"next",
"chunk",
"of",
"data",
"from",
"the",
"InputStream",
"associated",
"with",
"an",
"intercepted",
"stream",
"sending",
"that",
"data",
"as",
"a",
"blob",
"instruction",
"over",
"the",
"GuacamoleTunnel",
"associated",
"with",
"this",
"filter... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/InputStreamInterceptingFilter.java#L103-L139 |
116,037 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/InputStreamInterceptingFilter.java | InputStreamInterceptingFilter.handleAck | private void handleAck(GuacamoleInstruction instruction) {
// Verify all required arguments are present
List<String> args = instruction.getArgs();
if (args.size() < 3)
return;
// Pull associated stream
String index = args.get(0);
InterceptedStream<InputStrea... | java | private void handleAck(GuacamoleInstruction instruction) {
// Verify all required arguments are present
List<String> args = instruction.getArgs();
if (args.size() < 3)
return;
// Pull associated stream
String index = args.get(0);
InterceptedStream<InputStrea... | [
"private",
"void",
"handleAck",
"(",
"GuacamoleInstruction",
"instruction",
")",
"{",
"// Verify all required arguments are present",
"List",
"<",
"String",
">",
"args",
"=",
"instruction",
".",
"getArgs",
"(",
")",
";",
"if",
"(",
"args",
".",
"size",
"(",
")",... | Handles a single "ack" instruction, sending yet more blobs or closing the
stream depending on whether the "ack" indicates success or failure. If no
InputStream is associated with the stream index within the "ack"
instruction, the instruction is ignored.
@param instruction
The "ack" instruction being handled. | [
"Handles",
"a",
"single",
"ack",
"instruction",
"sending",
"yet",
"more",
"blobs",
"or",
"closing",
"the",
"stream",
"depending",
"on",
"whether",
"the",
"ack",
"indicates",
"success",
"or",
"failure",
".",
"If",
"no",
"InputStream",
"is",
"associated",
"with"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/InputStreamInterceptingFilter.java#L150-L191 |
116,038 | glyptodon/guacamole-client | guacamole-common/src/main/java/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.java | ConfiguredGuacamoleSocket.expect | private GuacamoleInstruction expect(GuacamoleReader reader, String opcode)
throws GuacamoleException {
// Wait for an instruction
GuacamoleInstruction instruction = reader.readInstruction();
if (instruction == null)
throw new GuacamoleServerException("End of stream while wai... | java | private GuacamoleInstruction expect(GuacamoleReader reader, String opcode)
throws GuacamoleException {
// Wait for an instruction
GuacamoleInstruction instruction = reader.readInstruction();
if (instruction == null)
throw new GuacamoleServerException("End of stream while wai... | [
"private",
"GuacamoleInstruction",
"expect",
"(",
"GuacamoleReader",
"reader",
",",
"String",
"opcode",
")",
"throws",
"GuacamoleException",
"{",
"// Wait for an instruction",
"GuacamoleInstruction",
"instruction",
"=",
"reader",
".",
"readInstruction",
"(",
")",
";",
"... | Waits for the instruction having the given opcode, returning that
instruction once it has been read. If the instruction is never read,
an exception is thrown.
@param reader The reader to read instructions from.
@param opcode The opcode of the instruction we are expecting.
@return The instruction having the given opcod... | [
"Waits",
"for",
"the",
"instruction",
"having",
"the",
"given",
"opcode",
"returning",
"that",
"instruction",
"once",
"it",
"has",
"been",
"read",
".",
"If",
"the",
"instruction",
"is",
"never",
"read",
"an",
"exception",
"is",
"thrown",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.java#L70-L84 |
116,039 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionResource.java | ConnectionResource.getConnectionParameters | @GET
@Path("parameters")
public Map<String, String> getConnectionParameters()
throws GuacamoleException {
// Pull effective permissions
Permissions effective = userContext.self().getEffectivePermissions();
// Retrieve permission sets
SystemPermissionSet systemPermis... | java | @GET
@Path("parameters")
public Map<String, String> getConnectionParameters()
throws GuacamoleException {
// Pull effective permissions
Permissions effective = userContext.self().getEffectivePermissions();
// Retrieve permission sets
SystemPermissionSet systemPermis... | [
"@",
"GET",
"@",
"Path",
"(",
"\"parameters\"",
")",
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getConnectionParameters",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Pull effective permissions",
"Permissions",
"effective",
"=",
"userContext",
".",
... | Retrieves the parameters associated with a single connection.
@return
A map of parameter name/value pairs.
@throws GuacamoleException
If an error occurs while retrieving the connection parameters. | [
"Retrieves",
"the",
"parameters",
"associated",
"with",
"a",
"single",
"connection",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionResource.java#L117-L141 |
116,040 | glyptodon/guacamole-client | extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/QuickConnectDirectory.java | QuickConnectDirectory.create | public String create(GuacamoleConfiguration config) throws GuacamoleException {
// Get the next available connection identifier.
String newConnectionId = Integer.toString(getNextConnectionID());
// Generate a name for the configuration.
String name = QCParser.getName(config);
... | java | public String create(GuacamoleConfiguration config) throws GuacamoleException {
// Get the next available connection identifier.
String newConnectionId = Integer.toString(getNextConnectionID());
// Generate a name for the configuration.
String name = QCParser.getName(config);
... | [
"public",
"String",
"create",
"(",
"GuacamoleConfiguration",
"config",
")",
"throws",
"GuacamoleException",
"{",
"// Get the next available connection identifier.",
"String",
"newConnectionId",
"=",
"Integer",
".",
"toString",
"(",
"getNextConnectionID",
"(",
")",
")",
";... | Create a SimpleConnection object from a GuacamoleConfiguration,
obtain an identifier, and place it on the tree, returning the
identifier value of the new connection.
@param config
The GuacamoleConfiguration object to use to create the
SimpleConnection object.
@return
The identifier of the connection created in the di... | [
"Create",
"a",
"SimpleConnection",
"object",
"from",
"a",
"GuacamoleConfiguration",
"obtain",
"an",
"identifier",
"and",
"place",
"it",
"on",
"the",
"tree",
"returning",
"the",
"identifier",
"value",
"of",
"the",
"new",
"connection",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/QuickConnectDirectory.java#L101-L120 |
116,041 | glyptodon/guacamole-client | extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/rest/QuickConnectREST.java | QuickConnectREST.create | @POST
@Path("create")
public Map<String, String> create(@FormParam("uri") String uri)
throws GuacamoleException {
return Collections.singletonMap("identifier",
directory.create(QCParser.getConfiguration(uri)));
} | java | @POST
@Path("create")
public Map<String, String> create(@FormParam("uri") String uri)
throws GuacamoleException {
return Collections.singletonMap("identifier",
directory.create(QCParser.getConfiguration(uri)));
} | [
"@",
"POST",
"@",
"Path",
"(",
"\"create\"",
")",
"public",
"Map",
"<",
"String",
",",
"String",
">",
"create",
"(",
"@",
"FormParam",
"(",
"\"uri\"",
")",
"String",
"uri",
")",
"throws",
"GuacamoleException",
"{",
"return",
"Collections",
".",
"singletonM... | Parse the URI read from the POST input, add the connection
to the directory, and return a Map containing a single key,
identifier, and the identifier of the new connection.
@param uri
The URI to parse into a connection.
@return
A Map containing a single key, identifier, and the
identifier of the new connection.
@thr... | [
"Parse",
"the",
"URI",
"read",
"from",
"the",
"POST",
"input",
"add",
"the",
"connection",
"to",
"the",
"directory",
"and",
"return",
"a",
"Map",
"containing",
"a",
"single",
"key",
"identifier",
"and",
"the",
"identifier",
"of",
"the",
"new",
"connection",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/rest/QuickConnectREST.java#L72-L80 |
116,042 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java | UserContextResource.getSelfResource | @Path("self")
public DirectoryObjectResource<User, APIUser> getSelfResource()
throws GuacamoleException {
return userResourceFactory.create(userContext,
userContext.getUserDirectory(), userContext.self());
} | java | @Path("self")
public DirectoryObjectResource<User, APIUser> getSelfResource()
throws GuacamoleException {
return userResourceFactory.create(userContext,
userContext.getUserDirectory(), userContext.self());
} | [
"@",
"Path",
"(",
"\"self\"",
")",
"public",
"DirectoryObjectResource",
"<",
"User",
",",
"APIUser",
">",
"getSelfResource",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"userResourceFactory",
".",
"create",
"(",
"userContext",
",",
"userContext",
".",... | Returns a new resource which represents the User whose access rights
control the operations of the UserContext exposed by this
UserContextResource.
@return
A new resource which represents the User whose access rights
control the operations of the UserContext exposed by this
UserContextResource.
@throws GuacamoleExcep... | [
"Returns",
"a",
"new",
"resource",
"which",
"represents",
"the",
"User",
"whose",
"access",
"rights",
"control",
"the",
"operations",
"of",
"the",
"UserContext",
"exposed",
"by",
"this",
"UserContextResource",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java#L140-L145 |
116,043 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java | UserContextResource.getActiveConnectionDirectoryResource | @Path("activeConnections")
public DirectoryResource<ActiveConnection, APIActiveConnection>
getActiveConnectionDirectoryResource() throws GuacamoleException {
return activeConnectionDirectoryResourceFactory.create(userContext,
userContext.getActiveConnectionDirectory());
} | java | @Path("activeConnections")
public DirectoryResource<ActiveConnection, APIActiveConnection>
getActiveConnectionDirectoryResource() throws GuacamoleException {
return activeConnectionDirectoryResourceFactory.create(userContext,
userContext.getActiveConnectionDirectory());
} | [
"@",
"Path",
"(",
"\"activeConnections\"",
")",
"public",
"DirectoryResource",
"<",
"ActiveConnection",
",",
"APIActiveConnection",
">",
"getActiveConnectionDirectoryResource",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"activeConnectionDirectoryResourceFactory",
... | Returns a new resource which represents the ActiveConnection Directory
contained within the UserContext exposed by this UserContextResource.
@return
A new resource which represents the ActiveConnection Directory
contained within the UserContext exposed by this UserContextResource.
@throws GuacamoleException
If an err... | [
"Returns",
"a",
"new",
"resource",
"which",
"represents",
"the",
"ActiveConnection",
"Directory",
"contained",
"within",
"the",
"UserContext",
"exposed",
"by",
"this",
"UserContextResource",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java#L158-L163 |
116,044 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java | UserContextResource.getConnectionDirectoryResource | @Path("connections")
public DirectoryResource<Connection, APIConnection> getConnectionDirectoryResource()
throws GuacamoleException {
return connectionDirectoryResourceFactory.create(userContext,
userContext.getConnectionDirectory());
} | java | @Path("connections")
public DirectoryResource<Connection, APIConnection> getConnectionDirectoryResource()
throws GuacamoleException {
return connectionDirectoryResourceFactory.create(userContext,
userContext.getConnectionDirectory());
} | [
"@",
"Path",
"(",
"\"connections\"",
")",
"public",
"DirectoryResource",
"<",
"Connection",
",",
"APIConnection",
">",
"getConnectionDirectoryResource",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"connectionDirectoryResourceFactory",
".",
"create",
"(",
"u... | Returns a new resource which represents the Connection Directory
contained within the UserContext exposed by this UserContextResource.
@return
A new resource which represents the Connection Directory contained
within the UserContext exposed by this UserContextResource.
@throws GuacamoleException
If an error occurs wh... | [
"Returns",
"a",
"new",
"resource",
"which",
"represents",
"the",
"Connection",
"Directory",
"contained",
"within",
"the",
"UserContext",
"exposed",
"by",
"this",
"UserContextResource",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java#L176-L181 |
116,045 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java | UserContextResource.getConnectionGroupDirectoryResource | @Path("connectionGroups")
public DirectoryResource<ConnectionGroup, APIConnectionGroup> getConnectionGroupDirectoryResource()
throws GuacamoleException {
return connectionGroupDirectoryResourceFactory.create(userContext,
userContext.getConnectionGroupDirectory());
} | java | @Path("connectionGroups")
public DirectoryResource<ConnectionGroup, APIConnectionGroup> getConnectionGroupDirectoryResource()
throws GuacamoleException {
return connectionGroupDirectoryResourceFactory.create(userContext,
userContext.getConnectionGroupDirectory());
} | [
"@",
"Path",
"(",
"\"connectionGroups\"",
")",
"public",
"DirectoryResource",
"<",
"ConnectionGroup",
",",
"APIConnectionGroup",
">",
"getConnectionGroupDirectoryResource",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"connectionGroupDirectoryResourceFactory",
"."... | Returns a new resource which represents the ConnectionGroup Directory
contained within the UserContext exposed by this UserContextResource.
@return
A new resource which represents the ConnectionGroup Directory
contained within the UserContext exposed by this UserContextResource.
@throws GuacamoleException
If an error... | [
"Returns",
"a",
"new",
"resource",
"which",
"represents",
"the",
"ConnectionGroup",
"Directory",
"contained",
"within",
"the",
"UserContext",
"exposed",
"by",
"this",
"UserContextResource",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java#L194-L199 |
116,046 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java | UserContextResource.getSharingProfileDirectoryResource | @Path("sharingProfiles")
public DirectoryResource<SharingProfile, APISharingProfile>
getSharingProfileDirectoryResource() throws GuacamoleException {
return sharingProfileDirectoryResourceFactory.create(userContext,
userContext.getSharingProfileDirectory());
} | java | @Path("sharingProfiles")
public DirectoryResource<SharingProfile, APISharingProfile>
getSharingProfileDirectoryResource() throws GuacamoleException {
return sharingProfileDirectoryResourceFactory.create(userContext,
userContext.getSharingProfileDirectory());
} | [
"@",
"Path",
"(",
"\"sharingProfiles\"",
")",
"public",
"DirectoryResource",
"<",
"SharingProfile",
",",
"APISharingProfile",
">",
"getSharingProfileDirectoryResource",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"sharingProfileDirectoryResourceFactory",
".",
"... | Returns a new resource which represents the SharingProfile Directory
contained within the UserContext exposed by this UserContextResource.
@return
A new resource which represents the SharingProfile Directory
contained within the UserContext exposed by this UserContextResource.
@throws GuacamoleException
If an error o... | [
"Returns",
"a",
"new",
"resource",
"which",
"represents",
"the",
"SharingProfile",
"Directory",
"contained",
"within",
"the",
"UserContext",
"exposed",
"by",
"this",
"UserContextResource",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java#L212-L217 |
116,047 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java | UserContextResource.getUserDirectoryResource | @Path("users")
public DirectoryResource<User, APIUser> getUserDirectoryResource()
throws GuacamoleException {
return userDirectoryResourceFactory.create(userContext,
userContext.getUserDirectory());
} | java | @Path("users")
public DirectoryResource<User, APIUser> getUserDirectoryResource()
throws GuacamoleException {
return userDirectoryResourceFactory.create(userContext,
userContext.getUserDirectory());
} | [
"@",
"Path",
"(",
"\"users\"",
")",
"public",
"DirectoryResource",
"<",
"User",
",",
"APIUser",
">",
"getUserDirectoryResource",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"userDirectoryResourceFactory",
".",
"create",
"(",
"userContext",
",",
"userCon... | Returns a new resource which represents the User Directory contained
within the UserContext exposed by this UserContextResource.
@return
A new resource which represents the User Directory contained within
the UserContext exposed by this UserContextResource.
@throws GuacamoleException
If an error occurs while retrievi... | [
"Returns",
"a",
"new",
"resource",
"which",
"represents",
"the",
"User",
"Directory",
"contained",
"within",
"the",
"UserContext",
"exposed",
"by",
"this",
"UserContextResource",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java#L230-L235 |
116,048 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java | UserContextResource.getUserGroupDirectoryResource | @Path("userGroups")
public DirectoryResource<UserGroup, APIUserGroup> getUserGroupDirectoryResource()
throws GuacamoleException {
return userGroupDirectoryResourceFactory.create(userContext,
userContext.getUserGroupDirectory());
} | java | @Path("userGroups")
public DirectoryResource<UserGroup, APIUserGroup> getUserGroupDirectoryResource()
throws GuacamoleException {
return userGroupDirectoryResourceFactory.create(userContext,
userContext.getUserGroupDirectory());
} | [
"@",
"Path",
"(",
"\"userGroups\"",
")",
"public",
"DirectoryResource",
"<",
"UserGroup",
",",
"APIUserGroup",
">",
"getUserGroupDirectoryResource",
"(",
")",
"throws",
"GuacamoleException",
"{",
"return",
"userGroupDirectoryResourceFactory",
".",
"create",
"(",
"userCo... | Returns a new resource which represents the UserGroup Directory contained
within the UserContext exposed by this UserContextResource.
@return
A new resource which represents the UserGroup Directory contained
within the UserContext exposed by this UserContextResource.
@throws GuacamoleException
If an error occurs whil... | [
"Returns",
"a",
"new",
"resource",
"which",
"represents",
"the",
"UserGroup",
"Directory",
"contained",
"within",
"the",
"UserContext",
"exposed",
"by",
"this",
"UserContextResource",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java#L248-L253 |
116,049 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/GuacamoleWebSocketTunnelServlet.java | GuacamoleWebSocketTunnelServlet.closeConnection | private void closeConnection(WsOutbound outbound, int guacamoleStatusCode,
int webSocketCode) {
try {
byte[] message = Integer.toString(guacamoleStatusCode).getBytes("UTF-8");
outbound.close(webSocketCode, ByteBuffer.wrap(message));
}
catch (IOException e) {
... | java | private void closeConnection(WsOutbound outbound, int guacamoleStatusCode,
int webSocketCode) {
try {
byte[] message = Integer.toString(guacamoleStatusCode).getBytes("UTF-8");
outbound.close(webSocketCode, ByteBuffer.wrap(message));
}
catch (IOException e) {
... | [
"private",
"void",
"closeConnection",
"(",
"WsOutbound",
"outbound",
",",
"int",
"guacamoleStatusCode",
",",
"int",
"webSocketCode",
")",
"{",
"try",
"{",
"byte",
"[",
"]",
"message",
"=",
"Integer",
".",
"toString",
"(",
"guacamoleStatusCode",
")",
".",
"getB... | Sends the given Guacamole and WebSocket numeric status
on the given WebSocket connection and closes the
connection.
@param outbound
The outbound WebSocket connection to close.
@param guacamoleStatusCode
The status to send.
@param webSocketCode
The numeric WebSocket status code to send. | [
"Sends",
"the",
"given",
"Guacamole",
"and",
"WebSocket",
"numeric",
"status",
"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/tomcat/GuacamoleWebSocketTunnelServlet.java#L85-L96 |
116,050 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java | ConnectionService.getConnections | public Map<String, Connection> getConnections(AuthenticatedUser user,
LDAPConnection ldapConnection) throws GuacamoleException {
// Do not return any connections if base DN is not specified
String configurationBaseDN = confService.getConfigurationBaseDN();
if (configurationBaseDN ==... | java | public Map<String, Connection> getConnections(AuthenticatedUser user,
LDAPConnection ldapConnection) throws GuacamoleException {
// Do not return any connections if base DN is not specified
String configurationBaseDN = confService.getConfigurationBaseDN();
if (configurationBaseDN ==... | [
"public",
"Map",
"<",
"String",
",",
"Connection",
">",
"getConnections",
"(",
"AuthenticatedUser",
"user",
",",
"LDAPConnection",
"ldapConnection",
")",
"throws",
"GuacamoleException",
"{",
"// Do not return any connections if base DN is not specified",
"String",
"configurat... | Returns all Guacamole connections accessible to the user currently bound
under the given LDAP connection.
@param user
The AuthenticatedUser object associated with the user who is
currently authenticated with Guacamole.
@param ldapConnection
The current connection to the LDAP server, associated with the
current user.
... | [
"Returns",
"all",
"Guacamole",
"connections",
"accessible",
"to",
"the",
"user",
"currently",
"bound",
"under",
"the",
"given",
"LDAP",
"connection",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/connection/ConnectionService.java#L102-L199 |
116,051 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java | AuthenticationProviderService.bindAs | private LDAPConnection bindAs(Credentials credentials)
throws GuacamoleException {
// Get username and password from credentials
String username = credentials.getUsername();
String password = credentials.getPassword();
// Require username
if (username == null || usernam... | java | private LDAPConnection bindAs(Credentials credentials)
throws GuacamoleException {
// Get username and password from credentials
String username = credentials.getUsername();
String password = credentials.getPassword();
// Require username
if (username == null || usernam... | [
"private",
"LDAPConnection",
"bindAs",
"(",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"// Get username and password from credentials",
"String",
"username",
"=",
"credentials",
".",
"getUsername",
"(",
")",
";",
"String",
"password",
"=",
"... | Binds to the LDAP server using the provided Guacamole credentials. The
DN of the user is derived using the LDAP configuration properties
provided in guacamole.properties, as is the server hostname and port
information.
@param credentials
The credentials to use to bind to the LDAP server.
@return
A bound LDAP connecti... | [
"Binds",
"to",
"the",
"LDAP",
"server",
"using",
"the",
"provided",
"Guacamole",
"credentials",
".",
"The",
"DN",
"of",
"the",
"user",
"is",
"derived",
"using",
"the",
"LDAP",
"configuration",
"properties",
"provided",
"in",
"guacamole",
".",
"properties",
"as... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java#L176-L205 |
116,052 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java | AuthenticationProviderService.authenticateUser | public LDAPAuthenticatedUser authenticateUser(Credentials credentials)
throws GuacamoleException {
// Attempt bind
LDAPConnection ldapConnection;
try {
ldapConnection = bindAs(credentials);
}
catch (GuacamoleException e) {
logger.error("Cannot... | java | public LDAPAuthenticatedUser authenticateUser(Credentials credentials)
throws GuacamoleException {
// Attempt bind
LDAPConnection ldapConnection;
try {
ldapConnection = bindAs(credentials);
}
catch (GuacamoleException e) {
logger.error("Cannot... | [
"public",
"LDAPAuthenticatedUser",
"authenticateUser",
"(",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"// Attempt bind",
"LDAPConnection",
"ldapConnection",
";",
"try",
"{",
"ldapConnection",
"=",
"bindAs",
"(",
"credentials",
")",
";",
"}"... | Returns an AuthenticatedUser representing the user authenticated by the
given credentials. Also adds custom LDAP attributes to the
AuthenticatedUser.
@param credentials
The credentials to use for authentication.
@return
An AuthenticatedUser representing the user authenticated by the
given credentials.
@throws Guacam... | [
"Returns",
"an",
"AuthenticatedUser",
"representing",
"the",
"user",
"authenticated",
"by",
"the",
"given",
"credentials",
".",
"Also",
"adds",
"custom",
"LDAP",
"attributes",
"to",
"the",
"AuthenticatedUser",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java#L223-L259 |
116,053 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java | AuthenticationProviderService.getAttributeTokens | private Map<String, String> getAttributeTokens(LDAPConnection ldapConnection,
String username) throws GuacamoleException {
// Get attributes from configuration information
List<String> attrList = confService.getAttributes();
// If there are no attributes there is no reason to searc... | java | private Map<String, String> getAttributeTokens(LDAPConnection ldapConnection,
String username) throws GuacamoleException {
// Get attributes from configuration information
List<String> attrList = confService.getAttributes();
// If there are no attributes there is no reason to searc... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"getAttributeTokens",
"(",
"LDAPConnection",
"ldapConnection",
",",
"String",
"username",
")",
"throws",
"GuacamoleException",
"{",
"// Get attributes from configuration information",
"List",
"<",
"String",
">",
"attr... | Returns parameter tokens generated from LDAP attributes on the user
currently bound under the given LDAP connection. The attributes to be
converted into parameter tokens must be explicitly listed in
guacamole.properties. If no attributes are specified or none are
found on the LDAP user object, an empty map is returned.... | [
"Returns",
"parameter",
"tokens",
"generated",
"from",
"LDAP",
"attributes",
"on",
"the",
"user",
"currently",
"bound",
"under",
"the",
"given",
"LDAP",
"connection",
".",
"The",
"attributes",
"to",
"be",
"converted",
"into",
"parameter",
"tokens",
"must",
"be",... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java#L283-L322 |
116,054 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java | AuthenticationProviderService.getUserContext | public LDAPUserContext getUserContext(AuthenticatedUser authenticatedUser)
throws GuacamoleException {
// Bind using credentials associated with AuthenticatedUser
Credentials credentials = authenticatedUser.getCredentials();
LDAPConnection ldapConnection = bindAs(credentials);
... | java | public LDAPUserContext getUserContext(AuthenticatedUser authenticatedUser)
throws GuacamoleException {
// Bind using credentials associated with AuthenticatedUser
Credentials credentials = authenticatedUser.getCredentials();
LDAPConnection ldapConnection = bindAs(credentials);
... | [
"public",
"LDAPUserContext",
"getUserContext",
"(",
"AuthenticatedUser",
"authenticatedUser",
")",
"throws",
"GuacamoleException",
"{",
"// Bind using credentials associated with AuthenticatedUser",
"Credentials",
"credentials",
"=",
"authenticatedUser",
".",
"getCredentials",
"(",... | Returns a UserContext object initialized with data accessible to the
given AuthenticatedUser.
@param authenticatedUser
The AuthenticatedUser to retrieve data for.
@return
A UserContext object initialized with data accessible to the given
AuthenticatedUser.
@throws GuacamoleException
If the UserContext cannot be crea... | [
"Returns",
"a",
"UserContext",
"object",
"initialized",
"with",
"data",
"accessible",
"to",
"the",
"given",
"AuthenticatedUser",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java#L338-L361 |
116,055 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ObjectQueryService.java | ObjectQueryService.getIdentifier | public String getIdentifier(LDAPEntry entry, Collection<String> attributes) {
// Retrieve the first value of the highest priority identifier attribute
for (String identifierAttribute : attributes) {
LDAPAttribute identifier = entry.getAttribute(identifierAttribute);
if (identifi... | java | public String getIdentifier(LDAPEntry entry, Collection<String> attributes) {
// Retrieve the first value of the highest priority identifier attribute
for (String identifierAttribute : attributes) {
LDAPAttribute identifier = entry.getAttribute(identifierAttribute);
if (identifi... | [
"public",
"String",
"getIdentifier",
"(",
"LDAPEntry",
"entry",
",",
"Collection",
"<",
"String",
">",
"attributes",
")",
"{",
"// Retrieve the first value of the highest priority identifier attribute",
"for",
"(",
"String",
"identifierAttribute",
":",
"attributes",
")",
... | Returns the identifier of the object represented by the given LDAP
entry. Multiple attributes may be declared as containing the identifier
of the object when present on an LDAP entry. If multiple such attributes
are present on the same LDAP entry, the value of the attribute with
highest priority is used. If multiple co... | [
"Returns",
"the",
"identifier",
"of",
"the",
"object",
"represented",
"by",
"the",
"given",
"LDAP",
"entry",
".",
"Multiple",
"attributes",
"may",
"be",
"declared",
"as",
"containing",
"the",
"identifier",
"of",
"the",
"object",
"when",
"present",
"on",
"an",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ObjectQueryService.java#L90-L102 |
116,056 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ObjectQueryService.java | ObjectQueryService.generateQuery | public String generateQuery(String filter,
Collection<String> attributes, String attributeValue) {
// Build LDAP query for objects having at least one attribute and with
// the given search filter
StringBuilder ldapQuery = new StringBuilder();
ldapQuery.append("(&");
... | java | public String generateQuery(String filter,
Collection<String> attributes, String attributeValue) {
// Build LDAP query for objects having at least one attribute and with
// the given search filter
StringBuilder ldapQuery = new StringBuilder();
ldapQuery.append("(&");
... | [
"public",
"String",
"generateQuery",
"(",
"String",
"filter",
",",
"Collection",
"<",
"String",
">",
"attributes",
",",
"String",
"attributeValue",
")",
"{",
"// Build LDAP query for objects having at least one attribute and with",
"// the given search filter",
"StringBuilder",... | Generates a properly-escaped LDAP query which finds all objects which
match the given LDAP filter and which have at least one of the given
attributes set to the specified value.
@param filter
The LDAP filter to apply to reduce the results of the query in
addition to testing the values of the given attributes.
@param ... | [
"Generates",
"a",
"properly",
"-",
"escaped",
"LDAP",
"query",
"which",
"finds",
"all",
"objects",
"which",
"match",
"the",
"given",
"LDAP",
"filter",
"and",
"which",
"have",
"at",
"least",
"one",
"of",
"the",
"given",
"attributes",
"set",
"to",
"the",
"sp... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ObjectQueryService.java#L128-L165 |
116,057 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ObjectQueryService.java | ObjectQueryService.search | public List<LDAPEntry> search(LDAPConnection ldapConnection,
String baseDN, String query) throws GuacamoleException {
logger.debug("Searching \"{}\" for objects matching \"{}\".", baseDN, query);
try {
// Search within subtree of given base DN
LDAPSearchResults res... | java | public List<LDAPEntry> search(LDAPConnection ldapConnection,
String baseDN, String query) throws GuacamoleException {
logger.debug("Searching \"{}\" for objects matching \"{}\".", baseDN, query);
try {
// Search within subtree of given base DN
LDAPSearchResults res... | [
"public",
"List",
"<",
"LDAPEntry",
">",
"search",
"(",
"LDAPConnection",
"ldapConnection",
",",
"String",
"baseDN",
",",
"String",
"query",
")",
"throws",
"GuacamoleException",
"{",
"logger",
".",
"debug",
"(",
"\"Searching \\\"{}\\\" for objects matching \\\"{}\\\".\"... | Executes an arbitrary LDAP query using the given connection, returning a
list of all results. Only objects beneath the given base DN are
included in the search.
@param ldapConnection
The current connection to the LDAP server, associated with the
current user.
@param baseDN
The base DN to search using the given LDAP q... | [
"Executes",
"an",
"arbitrary",
"LDAP",
"query",
"using",
"the",
"given",
"connection",
"returning",
"a",
"list",
"of",
"all",
"results",
".",
"Only",
"objects",
"beneath",
"the",
"given",
"base",
"DN",
"are",
"included",
"in",
"the",
"search",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ObjectQueryService.java#L191-L240 |
116,058 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java | AuthenticationService.getLoggableAddress | private String getLoggableAddress(HttpServletRequest request) {
// Log X-Forwarded-For, if present and valid
String header = request.getHeader("X-Forwarded-For");
if (header != null && X_FORWARDED_FOR.matcher(header).matches())
return "[" + header + ", " + request.getRemoteAddr() + ... | java | private String getLoggableAddress(HttpServletRequest request) {
// Log X-Forwarded-For, if present and valid
String header = request.getHeader("X-Forwarded-For");
if (header != null && X_FORWARDED_FOR.matcher(header).matches())
return "[" + header + ", " + request.getRemoteAddr() + ... | [
"private",
"String",
"getLoggableAddress",
"(",
"HttpServletRequest",
"request",
")",
"{",
"// Log X-Forwarded-For, if present and valid",
"String",
"header",
"=",
"request",
".",
"getHeader",
"(",
"\"X-Forwarded-For\"",
")",
";",
"if",
"(",
"header",
"!=",
"null",
"&... | Returns a formatted string containing an IP address, or list of IP
addresses, which represent the HTTP client and any involved proxies. As
the headers used to determine proxies can easily be forged, this data is
superficially validated to ensure that it at least looks like a list of
IPs.
@param request
The HTTP reques... | [
"Returns",
"a",
"formatted",
"string",
"containing",
"an",
"IP",
"address",
"or",
"list",
"of",
"IP",
"addresses",
"which",
"represent",
"the",
"HTTP",
"client",
"and",
"any",
"involved",
"proxies",
".",
"As",
"the",
"headers",
"used",
"to",
"determine",
"pr... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java#L127-L137 |
116,059 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java | AuthenticationService.authenticateUser | private AuthenticatedUser authenticateUser(Credentials credentials)
throws GuacamoleException {
GuacamoleCredentialsException authFailure = null;
// Attempt authentication against each AuthenticationProvider
for (AuthenticationProvider authProvider : authProviders) {
// At... | java | private AuthenticatedUser authenticateUser(Credentials credentials)
throws GuacamoleException {
GuacamoleCredentialsException authFailure = null;
// Attempt authentication against each AuthenticationProvider
for (AuthenticationProvider authProvider : authProviders) {
// At... | [
"private",
"AuthenticatedUser",
"authenticateUser",
"(",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"GuacamoleCredentialsException",
"authFailure",
"=",
"null",
";",
"// Attempt authentication against each AuthenticationProvider",
"for",
"(",
"Authent... | Attempts authentication against all AuthenticationProviders, in order,
using the provided credentials. The first authentication failure takes
priority, but remaining AuthenticationProviders are attempted. If any
AuthenticationProvider succeeds, the resulting AuthenticatedUser is
returned, and no further AuthenticationP... | [
"Attempts",
"authentication",
"against",
"all",
"AuthenticationProviders",
"in",
"order",
"using",
"the",
"provided",
"credentials",
".",
"The",
"first",
"authentication",
"failure",
"takes",
"priority",
"but",
"remaining",
"AuthenticationProviders",
"are",
"attempted",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java#L158-L191 |
116,060 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java | AuthenticationService.updateAuthenticatedUser | private AuthenticatedUser updateAuthenticatedUser(AuthenticatedUser authenticatedUser,
Credentials credentials) throws GuacamoleException {
// Get original AuthenticationProvider
AuthenticationProvider authProvider = authenticatedUser.getAuthenticationProvider();
// Re-authenticate... | java | private AuthenticatedUser updateAuthenticatedUser(AuthenticatedUser authenticatedUser,
Credentials credentials) throws GuacamoleException {
// Get original AuthenticationProvider
AuthenticationProvider authProvider = authenticatedUser.getAuthenticationProvider();
// Re-authenticate... | [
"private",
"AuthenticatedUser",
"updateAuthenticatedUser",
"(",
"AuthenticatedUser",
"authenticatedUser",
",",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"// Get original AuthenticationProvider",
"AuthenticationProvider",
"authProvider",
"=",
"authentic... | Re-authenticates the given AuthenticatedUser against the
AuthenticationProvider that originally created it, using the given
Credentials.
@param authenticatedUser
The AuthenticatedUser to re-authenticate.
@param credentials
The Credentials to use to re-authenticate the user.
@return
A AuthenticatedUser which may have... | [
"Re",
"-",
"authenticates",
"the",
"given",
"AuthenticatedUser",
"against",
"the",
"AuthenticationProvider",
"that",
"originally",
"created",
"it",
"using",
"the",
"given",
"Credentials",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java#L211-L224 |
116,061 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java | AuthenticationService.getAuthenticatedUser | private AuthenticatedUser getAuthenticatedUser(GuacamoleSession existingSession,
Credentials credentials) throws GuacamoleException {
try {
// Re-authenticate user if session exists
if (existingSession != null) {
AuthenticatedUser updatedUser = updateAuthent... | java | private AuthenticatedUser getAuthenticatedUser(GuacamoleSession existingSession,
Credentials credentials) throws GuacamoleException {
try {
// Re-authenticate user if session exists
if (existingSession != null) {
AuthenticatedUser updatedUser = updateAuthent... | [
"private",
"AuthenticatedUser",
"getAuthenticatedUser",
"(",
"GuacamoleSession",
"existingSession",
",",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"try",
"{",
"// Re-authenticate user if session exists",
"if",
"(",
"existingSession",
"!=",
"null"... | Returns the AuthenticatedUser associated with the given session and
credentials, performing a fresh authentication and creating a new
AuthenticatedUser if necessary.
@param existingSession
The current GuacamoleSession, or null if no session exists yet.
@param credentials
The Credentials to use to authenticate the use... | [
"Returns",
"the",
"AuthenticatedUser",
"associated",
"with",
"the",
"given",
"session",
"and",
"credentials",
"performing",
"a",
"fresh",
"authentication",
"and",
"creating",
"a",
"new",
"AuthenticatedUser",
"if",
"necessary",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java#L274-L326 |
116,062 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java | AuthenticationService.getUserContexts | private List<DecoratedUserContext> getUserContexts(GuacamoleSession existingSession,
AuthenticatedUser authenticatedUser, Credentials credentials)
throws GuacamoleException {
List<DecoratedUserContext> userContexts =
new ArrayList<DecoratedUserContext>(authProviders.size... | java | private List<DecoratedUserContext> getUserContexts(GuacamoleSession existingSession,
AuthenticatedUser authenticatedUser, Credentials credentials)
throws GuacamoleException {
List<DecoratedUserContext> userContexts =
new ArrayList<DecoratedUserContext>(authProviders.size... | [
"private",
"List",
"<",
"DecoratedUserContext",
">",
"getUserContexts",
"(",
"GuacamoleSession",
"existingSession",
",",
"AuthenticatedUser",
"authenticatedUser",
",",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"List",
"<",
"DecoratedUserContext... | Returns all UserContexts associated with the given AuthenticatedUser,
updating existing UserContexts, if any. If no UserContexts are yet
associated with the given AuthenticatedUser, new UserContexts are
generated by polling each available AuthenticationProvider.
@param existingSession
The current GuacamoleSession, or ... | [
"Returns",
"all",
"UserContexts",
"associated",
"with",
"the",
"given",
"AuthenticatedUser",
"updating",
"existing",
"UserContexts",
"if",
"any",
".",
"If",
"no",
"UserContexts",
"are",
"yet",
"associated",
"with",
"the",
"given",
"AuthenticatedUser",
"new",
"UserCo... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java#L352-L406 |
116,063 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java | AuthenticationService.authenticate | public String authenticate(Credentials credentials, String token)
throws GuacamoleException {
// Pull existing session if token provided
GuacamoleSession existingSession;
if (token != null)
existingSession = tokenSessionMap.get(token);
else
existingSessio... | java | public String authenticate(Credentials credentials, String token)
throws GuacamoleException {
// Pull existing session if token provided
GuacamoleSession existingSession;
if (token != null)
existingSession = tokenSessionMap.get(token);
else
existingSessio... | [
"public",
"String",
"authenticate",
"(",
"Credentials",
"credentials",
",",
"String",
"token",
")",
"throws",
"GuacamoleException",
"{",
"// Pull existing session if token provided",
"GuacamoleSession",
"existingSession",
";",
"if",
"(",
"token",
"!=",
"null",
")",
"exi... | Authenticates a user using the given credentials and optional
authentication token, returning the authentication token associated with
the user's Guacamole session, which may be newly generated. If an
existing token is provided, the authentication procedure will attempt to
update or reuse the provided token, but it is ... | [
"Authenticates",
"a",
"user",
"using",
"the",
"given",
"credentials",
"and",
"optional",
"authentication",
"token",
"returning",
"the",
"authentication",
"token",
"associated",
"with",
"the",
"user",
"s",
"Guacamole",
"session",
"which",
"may",
"be",
"newly",
"gen... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java#L430-L461 |
116,064 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java | AuthenticationService.getGuacamoleSession | public GuacamoleSession getGuacamoleSession(String authToken)
throws GuacamoleException {
// Try to get the session from the map of logged in users.
GuacamoleSession session = tokenSessionMap.get(authToken);
// Authentication failed.
if (session == null)
... | java | public GuacamoleSession getGuacamoleSession(String authToken)
throws GuacamoleException {
// Try to get the session from the map of logged in users.
GuacamoleSession session = tokenSessionMap.get(authToken);
// Authentication failed.
if (session == null)
... | [
"public",
"GuacamoleSession",
"getGuacamoleSession",
"(",
"String",
"authToken",
")",
"throws",
"GuacamoleException",
"{",
"// Try to get the session from the map of logged in users.",
"GuacamoleSession",
"session",
"=",
"tokenSessionMap",
".",
"get",
"(",
"authToken",
")",
"... | Finds the Guacamole session for a given auth token, if the auth token
represents a currently logged in user. Throws an unauthorized error
otherwise.
@param authToken The auth token to check against the map of logged in users.
@return The session that corresponds to the provided auth token.
@throws GuacamoleException I... | [
"Finds",
"the",
"Guacamole",
"session",
"for",
"a",
"given",
"auth",
"token",
"if",
"the",
"auth",
"token",
"represents",
"a",
"currently",
"logged",
"in",
"user",
".",
"Throws",
"an",
"unauthorized",
"error",
"otherwise",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java#L473-L485 |
116,065 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java | AuthenticationService.destroyGuacamoleSession | public boolean destroyGuacamoleSession(String authToken) {
// Remove corresponding GuacamoleSession if the token is valid
GuacamoleSession session = tokenSessionMap.remove(authToken);
if (session == null)
return false;
// Invalidate the removed session
session.inval... | java | public boolean destroyGuacamoleSession(String authToken) {
// Remove corresponding GuacamoleSession if the token is valid
GuacamoleSession session = tokenSessionMap.remove(authToken);
if (session == null)
return false;
// Invalidate the removed session
session.inval... | [
"public",
"boolean",
"destroyGuacamoleSession",
"(",
"String",
"authToken",
")",
"{",
"// Remove corresponding GuacamoleSession if the token is valid",
"GuacamoleSession",
"session",
"=",
"tokenSessionMap",
".",
"remove",
"(",
"authToken",
")",
";",
"if",
"(",
"session",
... | Invalidates a specific authentication token and its corresponding
Guacamole session, effectively logging out the associated user. If the
authentication token is not valid, this function has no effect.
@param authToken
The token being invalidated.
@return
true if the given authentication token was valid and the
corres... | [
"Invalidates",
"a",
"specific",
"authentication",
"token",
"and",
"its",
"corresponding",
"Guacamole",
"session",
"effectively",
"logging",
"out",
"the",
"associated",
"user",
".",
"If",
"the",
"authentication",
"token",
"is",
"not",
"valid",
"this",
"function",
"... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java#L500-L511 |
116,066 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/UserTunnel.java | UserTunnel.getActiveConnection | public ActiveConnection getActiveConnection() throws GuacamoleException {
// Pull the UUID of the current tunnel
UUID uuid = getUUID();
// Get the directory of active connections
Directory<ActiveConnection> activeConnectionDirectory = userContext.getActiveConnectionDirectory();
... | java | public ActiveConnection getActiveConnection() throws GuacamoleException {
// Pull the UUID of the current tunnel
UUID uuid = getUUID();
// Get the directory of active connections
Directory<ActiveConnection> activeConnectionDirectory = userContext.getActiveConnectionDirectory();
... | [
"public",
"ActiveConnection",
"getActiveConnection",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Pull the UUID of the current tunnel",
"UUID",
"uuid",
"=",
"getUUID",
"(",
")",
";",
"// Get the directory of active connections",
"Directory",
"<",
"ActiveConnection",
">"... | Returns the ActiveConnection object associated with this tunnel within
the AuthenticationProvider and UserContext which created the tunnel. If
the AuthenticationProvider is not tracking active connections, or this
tunnel is no longer active, this will be null.
@return
The ActiveConnection object associated with this t... | [
"Returns",
"the",
"ActiveConnection",
"object",
"associated",
"with",
"this",
"tunnel",
"within",
"the",
"AuthenticationProvider",
"and",
"UserContext",
"which",
"created",
"the",
"tunnel",
".",
"If",
"the",
"AuthenticationProvider",
"is",
"not",
"tracking",
"active",... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/UserTunnel.java#L90-L116 |
116,067 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java | ExtensionModule.bindAuthenticationProvider | private void bindAuthenticationProvider(
Class<? extends AuthenticationProvider> authenticationProvider,
Set<String> tolerateFailures) {
// Bind authentication provider
logger.debug("[{}] Binding AuthenticationProvider \"{}\".",
boundAuthenticationProviders.size(... | java | private void bindAuthenticationProvider(
Class<? extends AuthenticationProvider> authenticationProvider,
Set<String> tolerateFailures) {
// Bind authentication provider
logger.debug("[{}] Binding AuthenticationProvider \"{}\".",
boundAuthenticationProviders.size(... | [
"private",
"void",
"bindAuthenticationProvider",
"(",
"Class",
"<",
"?",
"extends",
"AuthenticationProvider",
">",
"authenticationProvider",
",",
"Set",
"<",
"String",
">",
"tolerateFailures",
")",
"{",
"// Bind authentication provider",
"logger",
".",
"debug",
"(",
"... | Binds the given AuthenticationProvider class such that any service
requiring access to the AuthenticationProvider can obtain it via
injection, along with any other bound AuthenticationProviders.
@param authenticationProvider
The AuthenticationProvider class to bind.
@param tolerateFailures
The set of identifiers of a... | [
"Binds",
"the",
"given",
"AuthenticationProvider",
"class",
"such",
"that",
"any",
"service",
"requiring",
"access",
"to",
"the",
"AuthenticationProvider",
"can",
"obtain",
"it",
"via",
"injection",
"along",
"with",
"any",
"other",
"bound",
"AuthenticationProviders",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java#L192-L202 |
116,068 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java | ExtensionModule.bindAuthenticationProviders | private void bindAuthenticationProviders(
Collection<Class<AuthenticationProvider>> authProviders,
Set<String> tolerateFailures) {
// Bind each authentication provider within extension
for (Class<AuthenticationProvider> authenticationProvider : authProviders)
bindAut... | java | private void bindAuthenticationProviders(
Collection<Class<AuthenticationProvider>> authProviders,
Set<String> tolerateFailures) {
// Bind each authentication provider within extension
for (Class<AuthenticationProvider> authenticationProvider : authProviders)
bindAut... | [
"private",
"void",
"bindAuthenticationProviders",
"(",
"Collection",
"<",
"Class",
"<",
"AuthenticationProvider",
">",
">",
"authProviders",
",",
"Set",
"<",
"String",
">",
"tolerateFailures",
")",
"{",
"// Bind each authentication provider within extension",
"for",
"(",
... | Binds each of the the given AuthenticationProvider classes such that any
service requiring access to the AuthenticationProvider can obtain it via
injection.
@param authProviders
The AuthenticationProvider classes to bind.
@param tolerateFailures
The set of identifiers of all authentication providers whose
internal fa... | [
"Binds",
"each",
"of",
"the",
"the",
"given",
"AuthenticationProvider",
"classes",
"such",
"that",
"any",
"service",
"requiring",
"access",
"to",
"the",
"AuthenticationProvider",
"can",
"obtain",
"it",
"via",
"injection",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java#L222-L346 |
116,069 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java | ExtensionModule.getToleratedAuthenticationProviders | private Set<String> getToleratedAuthenticationProviders() {
// Parse list of auth providers whose internal failures should be
// tolerated
try {
return environment.getProperty(SKIP_IF_UNAVAILABLE, Collections.<String>emptySet());
}
// Use empty set by default if pro... | java | private Set<String> getToleratedAuthenticationProviders() {
// Parse list of auth providers whose internal failures should be
// tolerated
try {
return environment.getProperty(SKIP_IF_UNAVAILABLE, Collections.<String>emptySet());
}
// Use empty set by default if pro... | [
"private",
"Set",
"<",
"String",
">",
"getToleratedAuthenticationProviders",
"(",
")",
"{",
"// Parse list of auth providers whose internal failures should be",
"// tolerated",
"try",
"{",
"return",
"environment",
".",
"getProperty",
"(",
"SKIP_IF_UNAVAILABLE",
",",
"Collecti... | Returns the set of identifiers of all authentication providers whose
internal failures should be tolerated during the authentication process.
If the identifier of an authentication provider is within this set,
errors during authentication will result in the authentication provider
being ignored for that authentication ... | [
"Returns",
"the",
"set",
"of",
"identifiers",
"of",
"all",
"authentication",
"providers",
"whose",
"internal",
"failures",
"should",
"be",
"tolerated",
"during",
"the",
"authentication",
"process",
".",
"If",
"the",
"identifier",
"of",
"an",
"authentication",
"pro... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java#L378-L393 |
116,070 | glyptodon/guacamole-client | extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java | AuthenticationProviderService.getRadiusChallenge | private CredentialsInfo getRadiusChallenge(RadiusPacket challengePacket) {
// Try to get the state attribute - if it's not there, we have a problem
RadiusAttribute stateAttr = challengePacket.findAttribute(Attr_State.TYPE);
if (stateAttr == null) {
logger.error("Something went wrong... | java | private CredentialsInfo getRadiusChallenge(RadiusPacket challengePacket) {
// Try to get the state attribute - if it's not there, we have a problem
RadiusAttribute stateAttr = challengePacket.findAttribute(Attr_State.TYPE);
if (stateAttr == null) {
logger.error("Something went wrong... | [
"private",
"CredentialsInfo",
"getRadiusChallenge",
"(",
"RadiusPacket",
"challengePacket",
")",
"{",
"// Try to get the state attribute - if it's not there, we have a problem",
"RadiusAttribute",
"stateAttr",
"=",
"challengePacket",
".",
"findAttribute",
"(",
"Attr_State",
".",
... | Returns the expected credentials from a RADIUS challenge.
@param challengePacket
The AccessChallenge RadiusPacket received from the RADIUS
server.
@return
A CredentialsInfo object that represents fields that need to
be presented to the user in order to complete authentication.
One of these must be the RADIUS state. | [
"Returns",
"the",
"expected",
"credentials",
"from",
"a",
"RADIUS",
"challenge",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java#L81-L107 |
116,071 | glyptodon/guacamole-client | extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/user/AuthenticatedUser.java | AuthenticatedUser.init | public void init(String username, Credentials credentials) {
this.credentials = credentials;
setIdentifier(username.toLowerCase());
} | java | public void init(String username, Credentials credentials) {
this.credentials = credentials;
setIdentifier(username.toLowerCase());
} | [
"public",
"void",
"init",
"(",
"String",
"username",
",",
"Credentials",
"credentials",
")",
"{",
"this",
".",
"credentials",
"=",
"credentials",
";",
"setIdentifier",
"(",
"username",
".",
"toLowerCase",
"(",
")",
")",
";",
"}"
] | Initializes this AuthenticatedUser using the given username and
credentials.
@param username
The username of the user that was authenticated.
@param credentials
The credentials provided when this user was authenticated. | [
"Initializes",
"this",
"AuthenticatedUser",
"using",
"the",
"given",
"username",
"and",
"credentials",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/user/AuthenticatedUser.java#L56-L59 |
116,072 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/JDBCInjectorProvider.java | JDBCInjectorProvider.get | public Injector get() throws GuacamoleException {
// Return existing Injector if already created
Injector value = injector.get();
if (value != null)
return value;
// Explicitly create and store new Injector only if necessary
injector.compareAndSet(null, create());
... | java | public Injector get() throws GuacamoleException {
// Return existing Injector if already created
Injector value = injector.get();
if (value != null)
return value;
// Explicitly create and store new Injector only if necessary
injector.compareAndSet(null, create());
... | [
"public",
"Injector",
"get",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Return existing Injector if already created",
"Injector",
"value",
"=",
"injector",
".",
"get",
"(",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"return",
"value",
";",
"// Expl... | Returns a common, singleton instance of a Guice Injector, configured for
the injections required by the JDBC authentication extension. The result
of the first call to this function will be cached statically within this
class, and will be returned for all subsequent calls.
@return
A singleton instance of the Guice Inje... | [
"Returns",
"a",
"common",
"singleton",
"instance",
"of",
"a",
"Guice",
"Injector",
"configured",
"for",
"the",
"injections",
"required",
"by",
"the",
"JDBC",
"authentication",
"extension",
".",
"The",
"result",
"of",
"the",
"first",
"call",
"to",
"this",
"func... | 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/JDBCInjectorProvider.java#L72-L86 |
116,073 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/permission/PermissionSetResource.java | PermissionSetResource.updatePermissionSet | private <PermissionType extends Permission> void updatePermissionSet(
APIPatch.Operation operation,
PermissionSetPatch<PermissionType> permissionSetPatch,
PermissionType permission) throws GuacamoleException {
// Add or remove permission based on operation
switch (op... | java | private <PermissionType extends Permission> void updatePermissionSet(
APIPatch.Operation operation,
PermissionSetPatch<PermissionType> permissionSetPatch,
PermissionType permission) throws GuacamoleException {
// Add or remove permission based on operation
switch (op... | [
"private",
"<",
"PermissionType",
"extends",
"Permission",
">",
"void",
"updatePermissionSet",
"(",
"APIPatch",
".",
"Operation",
"operation",
",",
"PermissionSetPatch",
"<",
"PermissionType",
">",
"permissionSetPatch",
",",
"PermissionType",
"permission",
")",
"throws"... | Updates the given permission set patch by queuing an add or remove
operation for the given permission based on the given patch operation.
@param <PermissionType>
The type of permission stored within the permission set.
@param operation
The patch operation to perform.
@param permissionSetPatch
The permission set patc... | [
"Updates",
"the",
"given",
"permission",
"set",
"patch",
"by",
"queuing",
"an",
"add",
"or",
"remove",
"operation",
"for",
"the",
"given",
"permission",
"based",
"on",
"the",
"given",
"patch",
"operation",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/permission/PermissionSetResource.java#L141-L165 |
116,074 | glyptodon/guacamole-client | extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java | TicketValidationService.validateTicket | public String validateTicket(String ticket, Credentials credentials) throws GuacamoleException {
// Retrieve the configured CAS URL, establish a ticket validator,
// and then attempt to validate the supplied ticket. If that succeeds,
// grab the principal returned by the validator.
URI... | java | public String validateTicket(String ticket, Credentials credentials) throws GuacamoleException {
// Retrieve the configured CAS URL, establish a ticket validator,
// and then attempt to validate the supplied ticket. If that succeeds,
// grab the principal returned by the validator.
URI... | [
"public",
"String",
"validateTicket",
"(",
"String",
"ticket",
",",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"// Retrieve the configured CAS URL, establish a ticket validator,",
"// and then attempt to validate the supplied ticket. If that succeeds,",
"/... | Validates and parses the given ID ticket, returning the username
provided by the CAS server in the ticket. If the
ticket is invalid an exception is thrown.
@param ticket
The ID ticket to validate and parse.
@param credentials
The Credentials object to store retrieved username and
password values in.
@return
The use... | [
"Validates",
"and",
"parses",
"the",
"given",
"ID",
"ticket",
"returning",
"the",
"username",
"provided",
"by",
"the",
"CAS",
"server",
"in",
"the",
"ticket",
".",
"If",
"the",
"ticket",
"is",
"invalid",
"an",
"exception",
"is",
"thrown",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java#L82-L120 |
116,075 | glyptodon/guacamole-client | extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java | TicketValidationService.decryptPassword | private final String decryptPassword(String encryptedPassword)
throws GuacamoleException {
// If we get nothing, we return nothing.
if (encryptedPassword == null || encryptedPassword.isEmpty()) {
logger.warn("No or empty encrypted password, no password will be available.");
... | java | private final String decryptPassword(String encryptedPassword)
throws GuacamoleException {
// If we get nothing, we return nothing.
if (encryptedPassword == null || encryptedPassword.isEmpty()) {
logger.warn("No or empty encrypted password, no password will be available.");
... | [
"private",
"final",
"String",
"decryptPassword",
"(",
"String",
"encryptedPassword",
")",
"throws",
"GuacamoleException",
"{",
"// If we get nothing, we return nothing.",
"if",
"(",
"encryptedPassword",
"==",
"null",
"||",
"encryptedPassword",
".",
"isEmpty",
"(",
")",
... | Takes an encrypted string representing a password provided by
the CAS ClearPass service and decrypts it using the private
key configured for this extension. Returns null if it is
unable to decrypt the password.
@param encryptedPassword
A string with the encrypted password provided by the
CAS service.
@return
The dec... | [
"Takes",
"an",
"encrypted",
"string",
"representing",
"a",
"password",
"provided",
"by",
"the",
"CAS",
"ClearPass",
"service",
"and",
"decrypts",
"it",
"using",
"the",
"private",
"key",
"configured",
"for",
"this",
"extension",
".",
"Returns",
"null",
"if",
"i... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java#L139-L186 |
116,076 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/ModeledPermissionService.java | ModeledPermissionService.getPermissionInstances | protected Set<PermissionType> getPermissionInstances(Collection<ModelType> models) {
// Create new collection of permissions by manually converting each model
Set<PermissionType> permissions = new HashSet<PermissionType>(models.size());
for (ModelType model : models)
permissions.add... | java | protected Set<PermissionType> getPermissionInstances(Collection<ModelType> models) {
// Create new collection of permissions by manually converting each model
Set<PermissionType> permissions = new HashSet<PermissionType>(models.size());
for (ModelType model : models)
permissions.add... | [
"protected",
"Set",
"<",
"PermissionType",
">",
"getPermissionInstances",
"(",
"Collection",
"<",
"ModelType",
">",
"models",
")",
"{",
"// Create new collection of permissions by manually converting each model",
"Set",
"<",
"PermissionType",
">",
"permissions",
"=",
"new",... | Returns a collection of permissions which are based on the models in
the given collection.
@param models
The model objects to use to produce the permissions within the
returned set.
@return
A set of permissions which are based on the models in the given
collection. | [
"Returns",
"a",
"collection",
"of",
"permissions",
"which",
"are",
"based",
"on",
"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/permission/ModeledPermissionService.java#L88-L97 |
116,077 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/ModeledPermissionService.java | ModeledPermissionService.getModelInstances | protected Collection<ModelType> getModelInstances(
ModeledPermissions<? extends EntityModel> targetEntity,
Collection<PermissionType> permissions) {
// Create new collection of models by manually converting each permission
Collection<ModelType> models = new ArrayList<ModelType>(... | java | protected Collection<ModelType> getModelInstances(
ModeledPermissions<? extends EntityModel> targetEntity,
Collection<PermissionType> permissions) {
// Create new collection of models by manually converting each permission
Collection<ModelType> models = new ArrayList<ModelType>(... | [
"protected",
"Collection",
"<",
"ModelType",
">",
"getModelInstances",
"(",
"ModeledPermissions",
"<",
"?",
"extends",
"EntityModel",
">",
"targetEntity",
",",
"Collection",
"<",
"PermissionType",
">",
"permissions",
")",
"{",
"// Create new collection of models by manual... | Returns a collection of model objects which are based on the given
permissions and target entity.
@param targetEntity
The entity to whom this permission is granted.
@param permissions
The permissions to use to produce the returned model objects.
@return
A collection of model objects which are based on the given
perm... | [
"Returns",
"a",
"collection",
"of",
"model",
"objects",
"which",
"are",
"based",
"on",
"the",
"given",
"permissions",
"and",
"target",
"entity",
"."
] | 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/ModeledPermissionService.java#L131-L142 |
116,078 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/session/SessionRESTService.java | SessionRESTService.getSessionResource | @Path("/")
public SessionResource getSessionResource(@QueryParam("token") String authToken)
throws GuacamoleException {
// Return a resource exposing the retrieved session
GuacamoleSession session = authenticationService.getGuacamoleSession(authToken);
return sessionResourceFact... | java | @Path("/")
public SessionResource getSessionResource(@QueryParam("token") String authToken)
throws GuacamoleException {
// Return a resource exposing the retrieved session
GuacamoleSession session = authenticationService.getGuacamoleSession(authToken);
return sessionResourceFact... | [
"@",
"Path",
"(",
"\"/\"",
")",
"public",
"SessionResource",
"getSessionResource",
"(",
"@",
"QueryParam",
"(",
"\"token\"",
")",
"String",
"authToken",
")",
"throws",
"GuacamoleException",
"{",
"// Return a resource exposing the retrieved session",
"GuacamoleSession",
"s... | Retrieves a resource representing the GuacamoleSession associated with
the given authentication token.
@param authToken
The authentication token that is used to authenticate the user
having the session being exposed.
@return
A resource representing the GuacamoleSession associated with the
given authentication token.
... | [
"Retrieves",
"a",
"resource",
"representing",
"the",
"GuacamoleSession",
"associated",
"with",
"the",
"given",
"authentication",
"token",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionRESTService.java#L69-L77 |
116,079 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/SharedObjectManager.java | SharedObjectManager.register | public void register(T object) {
// If already invalidated (or invalidation is in progress), avoid adding
// the object unnecessarily - just cleanup now
if (invalidated.get()) {
cleanup(object);
return;
}
// Store provided object
objects.add(obje... | java | public void register(T object) {
// If already invalidated (or invalidation is in progress), avoid adding
// the object unnecessarily - just cleanup now
if (invalidated.get()) {
cleanup(object);
return;
}
// Store provided object
objects.add(obje... | [
"public",
"void",
"register",
"(",
"T",
"object",
")",
"{",
"// If already invalidated (or invalidation is in progress), avoid adding",
"// the object unnecessarily - just cleanup now",
"if",
"(",
"invalidated",
".",
"get",
"(",
")",
")",
"{",
"cleanup",
"(",
"object",
")... | Registers the given object with this SharedObjectManager such that it is
cleaned up once the SharedObjectManager is invalidated. If the
SharedObjectManager has already been invalidated, the object will be
cleaned up immediately.
@param object
The object to register with this SharedObjectManager. | [
"Registers",
"the",
"given",
"object",
"with",
"this",
"SharedObjectManager",
"such",
"that",
"it",
"is",
"cleaned",
"up",
"once",
"the",
"SharedObjectManager",
"is",
"invalidated",
".",
"If",
"the",
"SharedObjectManager",
"has",
"already",
"been",
"invalidated",
... | 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/SharedObjectManager.java#L86-L103 |
116,080 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/AbstractPermissionService.java | AbstractPermissionService.getRelevantPermissionSet | protected ObjectPermissionSet getRelevantPermissionSet(ModeledUser user,
ModeledPermissions<? extends EntityModel> targetEntity)
throws GuacamoleException {
if (targetEntity.isUser())
return user.getUserPermissions();
if (targetEntity.isUserGroup())
retu... | java | protected ObjectPermissionSet getRelevantPermissionSet(ModeledUser user,
ModeledPermissions<? extends EntityModel> targetEntity)
throws GuacamoleException {
if (targetEntity.isUser())
return user.getUserPermissions();
if (targetEntity.isUserGroup())
retu... | [
"protected",
"ObjectPermissionSet",
"getRelevantPermissionSet",
"(",
"ModeledUser",
"user",
",",
"ModeledPermissions",
"<",
"?",
"extends",
"EntityModel",
">",
"targetEntity",
")",
"throws",
"GuacamoleException",
"{",
"if",
"(",
"targetEntity",
".",
"isUser",
"(",
")"... | Returns the ObjectPermissionSet related to the type of the given entity.
If the given entity represents a user, then the ObjectPermissionSet
containing user permissions is returned. If the given entity represents
a user group, then the ObjectPermissionSet containing user group
permissions is returned.
@param user
The ... | [
"Returns",
"the",
"ObjectPermissionSet",
"related",
"to",
"the",
"type",
"of",
"the",
"given",
"entity",
".",
"If",
"the",
"given",
"entity",
"represents",
"a",
"user",
"then",
"the",
"ObjectPermissionSet",
"containing",
"user",
"permissions",
"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/permission/AbstractPermissionService.java#L65-L78 |
116,081 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/AbstractPermissionService.java | AbstractPermissionService.canReadPermissions | protected boolean canReadPermissions(ModeledAuthenticatedUser user,
ModeledPermissions<? extends EntityModel> targetEntity)
throws GuacamoleException {
// A user can always read their own permissions
if (targetEntity.isUser(user.getUser().getIdentifier()))
return tru... | java | protected boolean canReadPermissions(ModeledAuthenticatedUser user,
ModeledPermissions<? extends EntityModel> targetEntity)
throws GuacamoleException {
// A user can always read their own permissions
if (targetEntity.isUser(user.getUser().getIdentifier()))
return tru... | [
"protected",
"boolean",
"canReadPermissions",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"ModeledPermissions",
"<",
"?",
"extends",
"EntityModel",
">",
"targetEntity",
")",
"throws",
"GuacamoleException",
"{",
"// A user can always read their own permissions",
"if",
"(",
... | Determines whether the given user can read the permissions currently
granted to the given target entity. If the reading user and the target
entity are not the same, then explicit READ or SYSTEM_ADMINISTER access
is required. Permission inheritance via user groups is taken into account.
@param user
The user attempting ... | [
"Determines",
"whether",
"the",
"given",
"user",
"can",
"read",
"the",
"permissions",
"currently",
"granted",
"to",
"the",
"given",
"target",
"entity",
".",
"If",
"the",
"reading",
"user",
"and",
"the",
"target",
"entity",
"are",
"not",
"the",
"same",
"then"... | 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/AbstractPermissionService.java#L99-L115 |
116,082 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserService.java | UserService.retrieveAuthenticatedUser | public ModeledAuthenticatedUser retrieveAuthenticatedUser(AuthenticationProvider authenticationProvider,
Credentials credentials) throws GuacamoleException {
// Get username and password
String username = credentials.getUsername();
String password = credentials.getPassword();
... | java | public ModeledAuthenticatedUser retrieveAuthenticatedUser(AuthenticationProvider authenticationProvider,
Credentials credentials) throws GuacamoleException {
// Get username and password
String username = credentials.getUsername();
String password = credentials.getPassword();
... | [
"public",
"ModeledAuthenticatedUser",
"retrieveAuthenticatedUser",
"(",
"AuthenticationProvider",
"authenticationProvider",
",",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"// Get username and password",
"String",
"username",
"=",
"credentials",
".",
... | Retrieves the user corresponding to the given credentials from the
database. Note that this function will not enforce any additional
account restrictions, including explicitly disabled accounts,
scheduling, and password expiration. It is the responsibility of the
caller to enforce such restrictions, if desired.
@param... | [
"Retrieves",
"the",
"user",
"corresponding",
"to",
"the",
"given",
"credentials",
"from",
"the",
"database",
".",
"Note",
"that",
"this",
"function",
"will",
"not",
"enforce",
"any",
"additional",
"account",
"restrictions",
"including",
"explicitly",
"disabled",
"... | 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/user/UserService.java#L357-L381 |
116,083 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserService.java | UserService.retrieveUser | public ModeledUser retrieveUser(AuthenticationProvider authenticationProvider,
AuthenticatedUser authenticatedUser) throws GuacamoleException {
// If we already queried this user, return that rather than querying again
if (authenticatedUser instanceof ModeledAuthenticatedUser)
r... | java | public ModeledUser retrieveUser(AuthenticationProvider authenticationProvider,
AuthenticatedUser authenticatedUser) throws GuacamoleException {
// If we already queried this user, return that rather than querying again
if (authenticatedUser instanceof ModeledAuthenticatedUser)
r... | [
"public",
"ModeledUser",
"retrieveUser",
"(",
"AuthenticationProvider",
"authenticationProvider",
",",
"AuthenticatedUser",
"authenticatedUser",
")",
"throws",
"GuacamoleException",
"{",
"// If we already queried this user, return that rather than querying again",
"if",
"(",
"authent... | Retrieves the user corresponding to the given AuthenticatedUser from the
database.
@param authenticationProvider
The AuthenticationProvider on behalf of which the user is being
retrieved.
@param authenticatedUser
The AuthenticatedUser to retrieve the corresponding ModeledUser of.
@return
The ModeledUser which corres... | [
"Retrieves",
"the",
"user",
"corresponding",
"to",
"the",
"given",
"AuthenticatedUser",
"from",
"the",
"database",
"."
] | 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/user/UserService.java#L402-L425 |
116,084 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserService.java | UserService.resetExpiredPassword | public void resetExpiredPassword(ModeledUser user, Credentials credentials)
throws GuacamoleException {
UserModel userModel = user.getModel();
// Get username
String username = user.getIdentifier();
// Pull new password from HTTP request
HttpServletRequest request ... | java | public void resetExpiredPassword(ModeledUser user, Credentials credentials)
throws GuacamoleException {
UserModel userModel = user.getModel();
// Get username
String username = user.getIdentifier();
// Pull new password from HTTP request
HttpServletRequest request ... | [
"public",
"void",
"resetExpiredPassword",
"(",
"ModeledUser",
"user",
",",
"Credentials",
"credentials",
")",
"throws",
"GuacamoleException",
"{",
"UserModel",
"userModel",
"=",
"user",
".",
"getModel",
"(",
")",
";",
"// Get username",
"String",
"username",
"=",
... | Resets the password of the given user to the new password specified via
the "new-password" and "confirm-new-password" parameters from the
provided credentials. If these parameters are missing or invalid,
additional credentials will be requested.
@param user
The user whose password should be reset.
@param credentials
... | [
"Resets",
"the",
"password",
"of",
"the",
"given",
"user",
"to",
"the",
"new",
"password",
"specified",
"via",
"the",
"new",
"-",
"password",
"and",
"confirm",
"-",
"new",
"-",
"password",
"parameters",
"from",
"the",
"provided",
"credentials",
".",
"If",
... | 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/user/UserService.java#L481-L521 |
116,085 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserService.java | UserService.getObjectInstances | protected List<ActivityRecord> getObjectInstances(List<ActivityRecordModel> models) {
// Create new list of records by manually converting each model
List<ActivityRecord> objects = new ArrayList<ActivityRecord>(models.size());
for (ActivityRecordModel model : models)
objects.add(get... | java | protected List<ActivityRecord> getObjectInstances(List<ActivityRecordModel> models) {
// Create new list of records by manually converting each model
List<ActivityRecord> objects = new ArrayList<ActivityRecord>(models.size());
for (ActivityRecordModel model : models)
objects.add(get... | [
"protected",
"List",
"<",
"ActivityRecord",
">",
"getObjectInstances",
"(",
"List",
"<",
"ActivityRecordModel",
">",
"models",
")",
"{",
"// Create new list of records by manually converting each model",
"List",
"<",
"ActivityRecord",
">",
"objects",
"=",
"new",
"ArrayLis... | Returns a list of ActivityRecord objects which are backed by the
models in the given list.
@param models
The model objects to use to back the activity record objects
within the returned list.
@return
A list of activity record objects which are backed by the models
in the given list. | [
"Returns",
"a",
"list",
"of",
"ActivityRecord",
"objects",
"which",
"are",
"backed",
"by",
"the",
"models",
"in",
"the",
"given",
"list",
"."
] | 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/user/UserService.java#L549-L558 |
116,086 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserService.java | UserService.retrieveHistory | public List<ActivityRecord> retrieveHistory(ModeledAuthenticatedUser authenticatedUser,
ModeledUser user) throws GuacamoleException {
String username = user.getIdentifier();
// Retrieve history only if READ permission is granted
if (hasObjectPermission(authenticatedUser, username, ... | java | public List<ActivityRecord> retrieveHistory(ModeledAuthenticatedUser authenticatedUser,
ModeledUser user) throws GuacamoleException {
String username = user.getIdentifier();
// Retrieve history only if READ permission is granted
if (hasObjectPermission(authenticatedUser, username, ... | [
"public",
"List",
"<",
"ActivityRecord",
">",
"retrieveHistory",
"(",
"ModeledAuthenticatedUser",
"authenticatedUser",
",",
"ModeledUser",
"user",
")",
"throws",
"GuacamoleException",
"{",
"String",
"username",
"=",
"user",
".",
"getIdentifier",
"(",
")",
";",
"// R... | Retrieves the login history of the given user, including any active
sessions.
@param authenticatedUser
The user retrieving the login history.
@param user
The user whose history is being retrieved.
@return
The login history of the given user, including any active sessions.
@throws GuacamoleException
If permission to... | [
"Retrieves",
"the",
"login",
"history",
"of",
"the",
"given",
"user",
"including",
"any",
"active",
"sessions",
"."
] | 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/user/UserService.java#L576-L588 |
116,087 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/schema/SchemaResource.java | SchemaResource.getProtocols | @GET
@Path("protocols")
public Map<String, ProtocolInfo> getProtocols() throws GuacamoleException {
// Get and return a map of all protocols.
Environment env = new LocalEnvironment();
return env.getProtocols();
} | java | @GET
@Path("protocols")
public Map<String, ProtocolInfo> getProtocols() throws GuacamoleException {
// Get and return a map of all protocols.
Environment env = new LocalEnvironment();
return env.getProtocols();
} | [
"@",
"GET",
"@",
"Path",
"(",
"\"protocols\"",
")",
"public",
"Map",
"<",
"String",
",",
"ProtocolInfo",
">",
"getProtocols",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Get and return a map of all protocols.",
"Environment",
"env",
"=",
"new",
"LocalEnvironm... | Gets a map of protocols defined in the system - protocol name to protocol.
@return
A map of protocol information, where each key is the unique name
associated with that protocol.
@throws GuacamoleException
If an error occurs while retrieving the available protocols. | [
"Gets",
"a",
"map",
"of",
"protocols",
"defined",
"in",
"the",
"system",
"-",
"protocol",
"name",
"to",
"protocol",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/schema/SchemaResource.java#L169-L177 |
116,088 | glyptodon/guacamole-client | guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java | GuacamoleWebSocketTunnelEndpoint.closeConnection | private void closeConnection(Session session, int guacamoleStatusCode,
int webSocketCode) {
try {
CloseCode code = CloseReason.CloseCodes.getCloseCode(webSocketCode);
String message = Integer.toString(guacamoleStatusCode);
session.close(new CloseReason(code, mess... | java | private void closeConnection(Session session, int guacamoleStatusCode,
int webSocketCode) {
try {
CloseCode code = CloseReason.CloseCodes.getCloseCode(webSocketCode);
String message = Integer.toString(guacamoleStatusCode);
session.close(new CloseReason(code, mess... | [
"private",
"void",
"closeConnection",
"(",
"Session",
"session",
",",
"int",
"guacamoleStatusCode",
",",
"int",
"webSocketCode",
")",
"{",
"try",
"{",
"CloseCode",
"code",
"=",
"CloseReason",
".",
"CloseCodes",
".",
"getCloseCode",
"(",
"webSocketCode",
")",
";"... | Sends the numeric Guacaomle Status Code and Web Socket
code and closes the connection.
@param session
The outbound WebSocket connection to close.
@param guacamoleStatusCode
The numeric Guacamole status to send.
@param webSocketCode
The numeric WebSocket status to send. | [
"Sends",
"the",
"numeric",
"Guacaomle",
"Status",
"Code",
"and",
"Web",
"Socket",
"code",
"and",
"closes",
"the",
"connection",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java#L100-L112 |
116,089 | glyptodon/guacamole-client | guacamole-ext/src/main/java/org/apache/guacamole/form/DateField.java | DateField.format | public static String format(Date date) {
DateFormat dateFormat = new SimpleDateFormat(DateField.FORMAT);
return date == null ? null : dateFormat.format(date);
} | java | public static String format(Date date) {
DateFormat dateFormat = new SimpleDateFormat(DateField.FORMAT);
return date == null ? null : dateFormat.format(date);
} | [
"public",
"static",
"String",
"format",
"(",
"Date",
"date",
")",
"{",
"DateFormat",
"dateFormat",
"=",
"new",
"SimpleDateFormat",
"(",
"DateField",
".",
"FORMAT",
")",
";",
"return",
"date",
"==",
"null",
"?",
"null",
":",
"dateFormat",
".",
"format",
"("... | Converts the given date into a string which follows the format used by
date fields.
@param date
The date value to format, which may be null.
@return
The formatted date, or null if the provided time was null. | [
"Converts",
"the",
"given",
"date",
"into",
"a",
"string",
"which",
"follows",
"the",
"format",
"used",
"by",
"date",
"fields",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/form/DateField.java#L58-L61 |
116,090 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java | TunnelResource.getActiveConnection | @Path("activeConnection")
public DirectoryObjectResource<ActiveConnection, APIActiveConnection>
getActiveConnection() throws GuacamoleException {
// Pull the UserContext from the tunnel
UserContext userContext = tunnel.getUserContext();
// Fail if the active connection cannot be fo... | java | @Path("activeConnection")
public DirectoryObjectResource<ActiveConnection, APIActiveConnection>
getActiveConnection() throws GuacamoleException {
// Pull the UserContext from the tunnel
UserContext userContext = tunnel.getUserContext();
// Fail if the active connection cannot be fo... | [
"@",
"Path",
"(",
"\"activeConnection\"",
")",
"public",
"DirectoryObjectResource",
"<",
"ActiveConnection",
",",
"APIActiveConnection",
">",
"getActiveConnection",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Pull the UserContext from the tunnel",
"UserContext",
"userC... | Retrieves a resource representing the ActiveConnection object associated
with this tunnel.
@return
A resource representing the ActiveConnection object associated with
this tunnel.
@throws GuacamoleException
If an error occurs while retrieving the ActiveConnection. | [
"Retrieves",
"a",
"resource",
"representing",
"the",
"ActiveConnection",
"object",
"associated",
"with",
"this",
"tunnel",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java#L91-L107 |
116,091 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java | TunnelResource.getStream | @Path("streams/{index}/{filename}")
public StreamResource getStream(@PathParam("index") final int streamIndex,
@QueryParam("type") @DefaultValue(DEFAULT_MEDIA_TYPE) String mediaType,
@PathParam("filename") String filename)
throws GuacamoleException {
return new StreamRes... | java | @Path("streams/{index}/{filename}")
public StreamResource getStream(@PathParam("index") final int streamIndex,
@QueryParam("type") @DefaultValue(DEFAULT_MEDIA_TYPE) String mediaType,
@PathParam("filename") String filename)
throws GuacamoleException {
return new StreamRes... | [
"@",
"Path",
"(",
"\"streams/{index}/{filename}\"",
")",
"public",
"StreamResource",
"getStream",
"(",
"@",
"PathParam",
"(",
"\"index\"",
")",
"final",
"int",
"streamIndex",
",",
"@",
"QueryParam",
"(",
"\"type\"",
")",
"@",
"DefaultValue",
"(",
"DEFAULT_MEDIA_TY... | Intercepts and returns the entire contents of a specific stream.
@param streamIndex
The index of the stream to intercept.
@param mediaType
The media type (mimetype) of the data within the stream.
@param filename
The filename to use for the sake of identifying the data returned.
@return
A response through which the ... | [
"Intercepts",
"and",
"returns",
"the",
"entire",
"contents",
"of",
"a",
"specific",
"stream",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java#L129-L137 |
116,092 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/extension/ProviderFactory.java | ProviderFactory.newInstance | static <T> T newInstance(String typeName, Class<? extends T> providerClass) {
T instance = null;
try {
// Attempt to instantiate the provider
instance = providerClass.getConstructor().newInstance();
}
catch (NoSuchMethodException e) {
logger.error("Th... | java | static <T> T newInstance(String typeName, Class<? extends T> providerClass) {
T instance = null;
try {
// Attempt to instantiate the provider
instance = providerClass.getConstructor().newInstance();
}
catch (NoSuchMethodException e) {
logger.error("Th... | [
"static",
"<",
"T",
">",
"T",
"newInstance",
"(",
"String",
"typeName",
",",
"Class",
"<",
"?",
"extends",
"T",
">",
"providerClass",
")",
"{",
"T",
"instance",
"=",
"null",
";",
"try",
"{",
"// Attempt to instantiate the provider",
"instance",
"=",
"provide... | Creates an instance of the specified provider class using the no-arg constructor.
@param typeName
The provider type name used for log messages; e.g. "authentication provider".
@param providerClass
The provider class to instantiate.
@param <T>
The provider type.
@return
A provider instance or null if no instance was... | [
"Creates",
"an",
"instance",
"of",
"the",
"specified",
"provider",
"class",
"using",
"the",
"no",
"-",
"arg",
"constructor",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/ProviderFactory.java#L54-L105 |
116,093 | glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java | ActiveConnectionService.hasObjectPermissions | private boolean hasObjectPermissions(ModeledAuthenticatedUser user,
String identifier, ObjectPermission.Type type)
throws GuacamoleException {
ObjectPermissionSet permissionSet = getPermissionSet(user);
return user.getUser().isAdministrator()
||... | java | private boolean hasObjectPermissions(ModeledAuthenticatedUser user,
String identifier, ObjectPermission.Type type)
throws GuacamoleException {
ObjectPermissionSet permissionSet = getPermissionSet(user);
return user.getUser().isAdministrator()
||... | [
"private",
"boolean",
"hasObjectPermissions",
"(",
"ModeledAuthenticatedUser",
"user",
",",
"String",
"identifier",
",",
"ObjectPermission",
".",
"Type",
"type",
")",
"throws",
"GuacamoleException",
"{",
"ObjectPermissionSet",
"permissionSet",
"=",
"getPermissionSet",
"("... | Return a boolean value representing whether or not a user has the given
permission available to them on the active connection with the given
identifier.
@param user
The user for which the permissions are being queried.
@param identifier
The identifier of the active connection we are wondering about.
@param type
The ... | [
"Return",
"a",
"boolean",
"value",
"representing",
"whether",
"or",
"not",
"a",
"user",
"has",
"the",
"given",
"permission",
"available",
"to",
"them",
"on",
"the",
"active",
"connection",
"with",
"the",
"given",
"identifier",
"."
] | 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/activeconnection/ActiveConnectionService.java#L207-L216 |
116,094 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingTunnel.java | StreamInterceptingTunnel.interceptStream | public void interceptStream(int index, OutputStream stream)
throws GuacamoleException {
// Log beginning of intercepted stream
logger.debug("Intercepting output stream #{} of tunnel \"{}\".",
index, getUUID());
try {
outputStreamFilter.interceptStream(in... | java | public void interceptStream(int index, OutputStream stream)
throws GuacamoleException {
// Log beginning of intercepted stream
logger.debug("Intercepting output stream #{} of tunnel \"{}\".",
index, getUUID());
try {
outputStreamFilter.interceptStream(in... | [
"public",
"void",
"interceptStream",
"(",
"int",
"index",
",",
"OutputStream",
"stream",
")",
"throws",
"GuacamoleException",
"{",
"// Log beginning of intercepted stream",
"logger",
".",
"debug",
"(",
"\"Intercepting output stream #{} of tunnel \\\"{}\\\".\"",
",",
"index",
... | Intercept all data received along the stream having the given index,
writing that data to the given OutputStream. The OutputStream will
automatically be closed when the stream ends. If there is no such
stream, then the OutputStream will be closed immediately. This function
will block until all received data has been wr... | [
"Intercept",
"all",
"data",
"received",
"along",
"the",
"stream",
"having",
"the",
"given",
"index",
"writing",
"that",
"data",
"to",
"the",
"given",
"OutputStream",
".",
"The",
"OutputStream",
"will",
"automatically",
"be",
"closed",
"when",
"the",
"stream",
... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingTunnel.java#L91-L108 |
116,095 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingTunnel.java | StreamInterceptingTunnel.interceptStream | public void interceptStream(int index, InputStream stream)
throws GuacamoleException {
// Log beginning of intercepted stream
logger.debug("Intercepting input stream #{} of tunnel \"{}\".",
index, getUUID());
try {
inputStreamFilter.interceptStream(index... | java | public void interceptStream(int index, InputStream stream)
throws GuacamoleException {
// Log beginning of intercepted stream
logger.debug("Intercepting input stream #{} of tunnel \"{}\".",
index, getUUID());
try {
inputStreamFilter.interceptStream(index... | [
"public",
"void",
"interceptStream",
"(",
"int",
"index",
",",
"InputStream",
"stream",
")",
"throws",
"GuacamoleException",
"{",
"// Log beginning of intercepted stream",
"logger",
".",
"debug",
"(",
"\"Intercepting input stream #{} of tunnel \\\"{}\\\".\"",
",",
"index",
... | Intercept the given stream, continuously writing the contents of the
given InputStream as blobs. The stream will automatically end when
when the end of the InputStream is reached. If there is no such
stream, then the InputStream will be closed immediately. This function
will block until all data from the InputStream ha... | [
"Intercept",
"the",
"given",
"stream",
"continuously",
"writing",
"the",
"contents",
"of",
"the",
"given",
"InputStream",
"as",
"blobs",
".",
"The",
"stream",
"will",
"automatically",
"end",
"when",
"when",
"the",
"end",
"of",
"the",
"InputStream",
"is",
"reac... | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingTunnel.java#L128-L145 |
116,096 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/permission/PermissionSetPatch.java | PermissionSetPatch.apply | public void apply(PermissionSet<PermissionType> permissionSet)
throws GuacamoleException {
// Add any added permissions
if (!addedPermissions.isEmpty())
permissionSet.addPermissions(addedPermissions);
// Remove any removed permissions
if (!removedPermissions.isEmpty... | java | public void apply(PermissionSet<PermissionType> permissionSet)
throws GuacamoleException {
// Add any added permissions
if (!addedPermissions.isEmpty())
permissionSet.addPermissions(addedPermissions);
// Remove any removed permissions
if (!removedPermissions.isEmpty... | [
"public",
"void",
"apply",
"(",
"PermissionSet",
"<",
"PermissionType",
">",
"permissionSet",
")",
"throws",
"GuacamoleException",
"{",
"// Add any added permissions",
"if",
"(",
"!",
"addedPermissions",
".",
"isEmpty",
"(",
")",
")",
"permissionSet",
".",
"addPermi... | Applies all queued changes to the given permission set.
@param permissionSet
The permission set to add and remove permissions from.
@throws GuacamoleException
If an error occurs while manipulating the permissions of the given
permission set. | [
"Applies",
"all",
"queued",
"changes",
"to",
"the",
"given",
"permission",
"set",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/permission/PermissionSetPatch.java#L81-L92 |
116,097 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java | StreamResource.getStreamContents | @GET
public Response getStreamContents() {
// Intercept all output
StreamingOutput stream = new StreamingOutput() {
@Override
public void write(OutputStream output) throws IOException {
try {
tunnel.interceptStream(streamIndex, output);
... | java | @GET
public Response getStreamContents() {
// Intercept all output
StreamingOutput stream = new StreamingOutput() {
@Override
public void write(OutputStream output) throws IOException {
try {
tunnel.interceptStream(streamIndex, output);
... | [
"@",
"GET",
"public",
"Response",
"getStreamContents",
"(",
")",
"{",
"// Intercept all output",
"StreamingOutput",
"stream",
"=",
"new",
"StreamingOutput",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"write",
"(",
"OutputStream",
"output",
")",
"throws",
... | Intercepts and returns the entire contents the stream represented by
this StreamResource.
@return
A response through which the entire contents of the intercepted
stream will be sent. | [
"Intercepts",
"and",
"returns",
"the",
"entire",
"contents",
"the",
"stream",
"represented",
"by",
"this",
"StreamResource",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java#L87-L114 |
116,098 | glyptodon/guacamole-client | guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java | StreamResource.setStreamContents | @POST
@Consumes(MediaType.WILDCARD)
public void setStreamContents(InputStream data) throws GuacamoleException {
// Send input over stream
tunnel.interceptStream(streamIndex, data);
} | java | @POST
@Consumes(MediaType.WILDCARD)
public void setStreamContents(InputStream data) throws GuacamoleException {
// Send input over stream
tunnel.interceptStream(streamIndex, data);
} | [
"@",
"POST",
"@",
"Consumes",
"(",
"MediaType",
".",
"WILDCARD",
")",
"public",
"void",
"setStreamContents",
"(",
"InputStream",
"data",
")",
"throws",
"GuacamoleException",
"{",
"// Send input over stream",
"tunnel",
".",
"interceptStream",
"(",
"streamIndex",
",",... | Intercepts the stream represented by this StreamResource, sending the
contents of the given InputStream over that stream as "blob"
instructions.
@param data
An InputStream containing the data to be sent over the intercepted
stream.
@throws GuacamoleException
If the intercepted stream closes with an error. | [
"Intercepts",
"the",
"stream",
"represented",
"by",
"this",
"StreamResource",
"sending",
"the",
"contents",
"of",
"the",
"given",
"InputStream",
"over",
"that",
"stream",
"as",
"blob",
"instructions",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java#L128-L135 |
116,099 | glyptodon/guacamole-client | extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java | LDAPConnectionService.createLDAPConnection | private LDAPConnection createLDAPConnection() throws GuacamoleException {
// Map encryption method to proper connection and socket factory
EncryptionMethod encryptionMethod = confService.getEncryptionMethod();
switch (encryptionMethod) {
// Unencrypted LDAP connection
c... | java | private LDAPConnection createLDAPConnection() throws GuacamoleException {
// Map encryption method to proper connection and socket factory
EncryptionMethod encryptionMethod = confService.getEncryptionMethod();
switch (encryptionMethod) {
// Unencrypted LDAP connection
c... | [
"private",
"LDAPConnection",
"createLDAPConnection",
"(",
")",
"throws",
"GuacamoleException",
"{",
"// Map encryption method to proper connection and socket factory",
"EncryptionMethod",
"encryptionMethod",
"=",
"confService",
".",
"getEncryptionMethod",
"(",
")",
";",
"switch",... | Creates a new instance of LDAPConnection, configured as required to use
whichever encryption method is requested within guacamole.properties.
@return
A new LDAPConnection instance which has already been configured to
use the encryption method requested within guacamole.properties.
@throws GuacamoleException
If an err... | [
"Creates",
"a",
"new",
"instance",
"of",
"LDAPConnection",
"configured",
"as",
"required",
"to",
"use",
"whichever",
"encryption",
"method",
"is",
"requested",
"within",
"guacamole",
".",
"properties",
"."
] | ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9 | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java#L63-L91 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.