You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2020/04/29 18:17:20 UTC

[GitHub] [guacamole-client] necouchman commented on a change in pull request #454: GUACAMOLE-793: CAS Provider returns Group - like LDAP Provider

necouchman commented on a change in pull request #454:
URL: https://github.com/apache/guacamole-client/pull/454#discussion_r417517214



##########
File path: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/util/TokensAndGroups.java
##########
@@ -0,0 +1,44 @@
+/*
+ * 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.util;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.HashSet;
+
+    /**
+     * A class to facilitate the return values of both Tokens and Groups
+     *
+     * @param tokens, groups
+     *     A Map<String, String> of tokens, parsed from attributes returned
+     *     by CAS.
+     *     A Set<String> of groups, parsed from attributes returned by CAS.
+     *
+     * @return an instance of itself
+     *
+     */
+    public class TokensAndGroups {
+        public final Map<String, String> tokens;
+        public final Set<String> effectiveGroups;
+        public <TokensAndGroups> TokensAndGroups(Map<String, String> tokens, Set<String> effectiveGroups) {

Review comment:
       Just `public TokensAndGroups(...` without any type specification.  Since the name of the method is the same as the name of the class, Java knows it is a constructor and that it is returning that as its type.




----------------------------------------------------------------
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:
users@infra.apache.org