[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460862 ## File path: extensions/guacamole-auth-cas/pom.xml ## @@ -254,6 +254,14 @@ 2.5 provided + + + +junit Review comment: Yeah - removed here and in LDAP module. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460220
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -102,5 +100,21 @@ public static String fromAttribute(String name) {
return builder.toString();
}
+
+/**
+ * Generate the name of a parameter from the given string, and with a blank
+ * prefix such that the token name will simply be the transformed version
+ * of the string.
Review comment:
Added a `@link`
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460231
##
File path:
guacamole-ext/src/test/java/org/apache/guacamole/token/TokenNameTest.java
##
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.guacamole.token;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+/**
+ * Test which verifies automatic generation of LDAP-specific connection
+ * parameter token names.
+ */
+public class TokenNameTest {
+
+/**
+ * Verifies that TokenName.canonicalize() generates token names as
+ * specified, regardless of the naming convention of the attribute.
Review comment:
Unattributed.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460234 ## File path: guacamole-ext/src/test/java/org/apache/guacamole/token/TokenNameTest.java ## @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.guacamole.token; + +import static org.junit.Assert.assertEquals; +import org.junit.Test; + +/** + * Test which verifies automatic generation of LDAP-specific connection Review comment: UnLDAPed. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460208
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -102,5 +100,21 @@ public static String fromAttribute(String name) {
return builder.toString();
}
+
+/**
+ * Generate the name of a parameter from the given string, and with a blank
Review comment:
Fixed.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460215
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -102,5 +100,21 @@ public static String fromAttribute(String name) {
return builder.toString();
}
+
+/**
+ * Generate the name of a parameter from the given string, and with a blank
+ * prefix such that the token name will simply be the transformed version
Review comment:
Yeah, that was some awkward language. Reworded.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460177
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -63,35 +57,39 @@
/**
* This utility class should not be instantiated.
*/
-private TokenName() {}
+protected TokenName() {}
/**
* Generates the name of the parameter token that should be populated with
- * the value of the given LDAP attribute. The name of the LDAP attribute
- * will automatically be transformed from "CamelCase", "headlessCamelCase",
- * "lowercase_with_underscores", and "mixes_ofBoth_Styles" to consistent
- * "UPPERCASE_WITH_UNDERSCORES". Each returned attribute will be prefixed
- * with "LDAP_".
+ * the given string. The provided string will be automatically transformed
+ * from "CamelCase", "headlessCamelCase", "lowercase_with_underscores",
+ * and "mixes_ofBoth_Styles" to consistent "UPPERCASE_WITH_UNDERSCORES".
+ * Each returned attribute will be prefixed with the string value provided
Review comment:
Fixed.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460182
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -63,35 +57,39 @@
/**
* This utility class should not be instantiated.
*/
-private TokenName() {}
+protected TokenName() {}
/**
* Generates the name of the parameter token that should be populated with
- * the value of the given LDAP attribute. The name of the LDAP attribute
- * will automatically be transformed from "CamelCase", "headlessCamelCase",
- * "lowercase_with_underscores", and "mixes_ofBoth_Styles" to consistent
- * "UPPERCASE_WITH_UNDERSCORES". Each returned attribute will be prefixed
- * with "LDAP_".
+ * the given string. The provided string will be automatically transformed
+ * from "CamelCase", "headlessCamelCase", "lowercase_with_underscores",
+ * and "mixes_ofBoth_Styles" to consistent "UPPERCASE_WITH_UNDERSCORES".
+ * Each returned attribute will be prefixed with the string value provided
+ * in the prefix. The value provided in prefix will be prepended to the
+ * attribute name, but will itself not be transformed.
Review comment:
Uh, yeah.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460170
##
File path:
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java
##
@@ -65,25 +66,26 @@
* The credentials to use for authentication.
*
* @return
- * An AuthenticatedUser representing the user authenticated by the
+ * A CASAuthenticatedUser representing the user authenticated by the
* given credentials.
*
* @throws GuacamoleException
* If an error occurs while authenticating the user, or if access is
* denied.
*/
-public AuthenticatedUser authenticateUser(Credentials credentials)
+public CASAuthenticatedUser authenticateUser(Credentials credentials)
throws GuacamoleException {
// Pull CAS ticket from request if present
HttpServletRequest request = credentials.getRequest();
if (request != null) {
String ticket =
request.getParameter(CASTicketField.PARAMETER_NAME);
if (ticket != null) {
-String username = ticketService.validateTicket(ticket,
credentials);
+Map tokens =
ticketService.validateTicket(ticket, credentials);
+String username = credentials.getUsername();
Review comment:
Yeah, that's a good point. I added an exception into the `validateTicket()`
method for `null` `username`s - let me know if that seems like an okay route?
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296460174
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -17,30 +17,24 @@
* under the License.
*/
-package org.apache.guacamole.auth.ldap;
+package org.apache.guacamole.token;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Utility class for generating parameter token names.
*/
-public class TokenName {
+public abstract class TokenName {
Review comment:
Leftover from when I had the LDAP and CAS-specific implementing classes.
Should be fixed.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296315644
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -63,35 +57,38 @@
/**
* This utility class should not be instantiated.
*/
-private TokenName() {}
+protected TokenName() {}
/**
* Generates the name of the parameter token that should be populated with
- * the value of the given LDAP attribute. The name of the LDAP attribute
- * will automatically be transformed from "CamelCase", "headlessCamelCase",
+ * the value of the given attribute. The name of the attribute will
Review comment:
Sounds good to me. Changed as requested.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296062053
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -63,35 +57,38 @@
/**
* This utility class should not be instantiated.
*/
-private TokenName() {}
+protected TokenName() {}
/**
* Generates the name of the parameter token that should be populated with
- * the value of the given LDAP attribute. The name of the LDAP attribute
- * will automatically be transformed from "CamelCase", "headlessCamelCase",
+ * the value of the given attribute. The name of the attribute will
Review comment:
So, I removed the LDAP stuff, but kept the `fromAttribute()` name - it seems
like most of the extensions still call these attributes, so maybe it isn't too
specific? I'm open to suggestions, but seems okay to me...
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296061694
##
File path:
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java
##
@@ -88,33 +92,39 @@ public String validateTicket(String ticket, Credentials
credentials) throws Guac
validator.setAcceptAnyProxy(true);
validator.setEncoding("UTF-8");
try {
+Map tokens = new HashMap<>();
String confRedirectURI = confService.getRedirectURI();
Assertion a = validator.validate(ticket, confRedirectURI);
AttributePrincipal principal = a.getPrincipal();
+Map ticketAttrs = principal.getAttributes();
// Retrieve username and set the credentials.
String username = principal.getName();
if (username != null)
credentials.setUsername(username);
// Retrieve password, attempt decryption, and set credentials.
-Object credObj = principal.getAttributes().get("credential");
+Object credObj = ticketAttrs.remove("credential");
Review comment:
Okay, cleaned this up by making a copy of the attributes.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296061741
##
File path:
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java
##
@@ -88,33 +92,39 @@ public String validateTicket(String ticket, Credentials
credentials) throws Guac
validator.setAcceptAnyProxy(true);
validator.setEncoding("UTF-8");
try {
+Map tokens = new HashMap<>();
String confRedirectURI = confService.getRedirectURI();
Assertion a = validator.validate(ticket, confRedirectURI);
AttributePrincipal principal = a.getPrincipal();
+Map ticketAttrs = principal.getAttributes();
// Retrieve username and set the credentials.
String username = principal.getName();
if (username != null)
credentials.setUsername(username);
// Retrieve password, attempt decryption, and set credentials.
-Object credObj = principal.getAttributes().get("credential");
+Object credObj = ticketAttrs.remove("credential");
if (credObj != null) {
String clearPass = decryptPassword(credObj.toString());
if (clearPass != null && !clearPass.isEmpty())
credentials.setPassword(clearPass);
}
+
+// Convert remaining attributes that have values to Strings
+for (Entry attr : ticketAttrs.entrySet()) {
Review comment:
Corrected.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296061806
##
File path:
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java
##
@@ -88,33 +92,39 @@ public String validateTicket(String ticket, Credentials
credentials) throws Guac
validator.setAcceptAnyProxy(true);
validator.setEncoding("UTF-8");
try {
+Map tokens = new HashMap<>();
String confRedirectURI = confService.getRedirectURI();
Assertion a = validator.validate(ticket, confRedirectURI);
AttributePrincipal principal = a.getPrincipal();
+Map ticketAttrs = principal.getAttributes();
// Retrieve username and set the credentials.
String username = principal.getName();
if (username != null)
credentials.setUsername(username);
// Retrieve password, attempt decryption, and set credentials.
-Object credObj = principal.getAttributes().get("credential");
+Object credObj = ticketAttrs.remove("credential");
if (credObj != null) {
String clearPass = decryptPassword(credObj.toString());
if (clearPass != null && !clearPass.isEmpty())
credentials.setPassword(clearPass);
}
+
+// Convert remaining attributes that have values to Strings
+for (Entry attr : ticketAttrs.entrySet()) {
+String tokenName =
CASTokenName.fromAttribute(attr.getKey().toString());
Review comment:
Changed.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296061594
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -63,35 +57,38 @@
/**
* This utility class should not be instantiated.
*/
-private TokenName() {}
+protected TokenName() {}
/**
* Generates the name of the parameter token that should be populated with
- * the value of the given LDAP attribute. The name of the LDAP attribute
- * will automatically be transformed from "CamelCase", "headlessCamelCase",
+ * the value of the given attribute. The name of the attribute will
+ * automatically be transformed from "CamelCase", "headlessCamelCase",
* "lowercase_with_underscores", and "mixes_ofBoth_Styles" to consistent
* "UPPERCASE_WITH_UNDERSCORES". Each returned attribute will be prefixed
* with "LDAP_".
*
* @param name
- * The name of the LDAP attribute to use to generate the token name.
+ * The name of the attribute to use to generate the token name.
+ *
+ * @param prefix
+ * The prefix to prepend to the generated token name.
Review comment:
Added some clarifications here.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296061643
##
File path:
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPTokenName.java
##
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.guacamole.auth.ldap;
+
+import org.apache.guacamole.token.TokenName;
+
+/**
+ * Utility class for generating parameter token names.
+ */
+public class LDAPTokenName extends TokenName {
Review comment:
Got rid of this and did as suggested.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296061482
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -63,35 +57,38 @@
/**
* This utility class should not be instantiated.
*/
-private TokenName() {}
+protected TokenName() {}
/**
* Generates the name of the parameter token that should be populated with
- * the value of the given LDAP attribute. The name of the LDAP attribute
- * will automatically be transformed from "CamelCase", "headlessCamelCase",
+ * the value of the given attribute. The name of the attribute will
+ * automatically be transformed from "CamelCase", "headlessCamelCase",
* "lowercase_with_underscores", and "mixes_ofBoth_Styles" to consistent
* "UPPERCASE_WITH_UNDERSCORES". Each returned attribute will be prefixed
* with "LDAP_".
Review comment:
Cleaned up this comment.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
[GitHub] [guacamole-client] necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user attributes from CAS ticket
necouchman commented on a change in pull request #303: GUACAMOLE-579: Get user
attributes from CAS ticket
URL: https://github.com/apache/guacamole-client/pull/303#discussion_r296061455
##
File path:
guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java
##
@@ -63,35 +57,38 @@
/**
* This utility class should not be instantiated.
*/
-private TokenName() {}
+protected TokenName() {}
/**
* Generates the name of the parameter token that should be populated with
- * the value of the given LDAP attribute. The name of the LDAP attribute
- * will automatically be transformed from "CamelCase", "headlessCamelCase",
+ * the value of the given attribute. The name of the attribute will
+ * automatically be transformed from "CamelCase", "headlessCamelCase",
* "lowercase_with_underscores", and "mixes_ofBoth_Styles" to consistent
* "UPPERCASE_WITH_UNDERSCORES". Each returned attribute will be prefixed
* with "LDAP_".
*
* @param name
- * The name of the LDAP attribute to use to generate the token name.
+ * The name of the attribute to use to generate the token name.
+ *
+ * @param prefix
+ * The prefix to prepend to the generated token name.
*
* @return
* The name of the parameter token that should be populated with the
- * value of the LDAP attribute having the given name.
+ * value of the attribute having the given name.
*/
-public static String fromAttribute(String name) {
+public static String fromAttribute(final String name, final String prefix)
{
Review comment:
Implemented.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
