mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-579: Change fromAttribute to canonicalize
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* 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.cas;
|
||||
|
||||
import org.apache.guacamole.token.TokenName;
|
||||
|
||||
/**
|
||||
* Utility class for generating parameter token names.
|
||||
*/
|
||||
public class CASTokenName extends TokenName {
|
||||
|
||||
public static String fromAttribute(String name) {
|
||||
return fromAttribute(name, "CAS_");
|
||||
}
|
||||
|
||||
}
|
@@ -119,7 +119,7 @@ public class TicketValidationService {
|
||||
|
||||
// Convert remaining attributes that have values to Strings
|
||||
for (Entry <String, Object> attr : ticketAttrs.entrySet()) {
|
||||
String tokenName = TokenName.fromAttribute(attr.getKey(),
|
||||
String tokenName = TokenName.canonicalize(attr.getKey(),
|
||||
CAS_ATTRIBUTE_TOKEN_PREFIX);
|
||||
Object value = attr.getValue();
|
||||
if (value != null)
|
||||
|
@@ -315,7 +315,7 @@ public class AuthenticationProviderService {
|
||||
// Convert each retrieved attribute into a corresponding token
|
||||
for (Object attrObj : attrSet) {
|
||||
LDAPAttribute attr = (LDAPAttribute)attrObj;
|
||||
tokens.put(TokenName.fromAttribute(attr.getName(),
|
||||
tokens.put(TokenName.canonicalize(attr.getName(),
|
||||
LDAP_ATTRIBUTE_TOKEN_PREFIX), attr.getStringValue());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user