View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.syncope.common.lib.policy;
20  
21  import io.swagger.v3.oas.annotations.media.Schema;
22  import java.net.URI;
23  import java.util.HashMap;
24  import java.util.Map;
25  
26  public class DefaultAccessPolicyConf implements AccessPolicyConf {
27  
28      private static final long serialVersionUID = 1153200197344709778L;
29  
30      private int order;
31  
32      private boolean enabled = true;
33  
34      private boolean ssoEnabled = true;
35  
36      private boolean requireAllAttributes = true;
37  
38      private boolean caseInsensitive;
39  
40      private URI unauthorizedRedirectUrl;
41  
42      @Schema(description =
43              "Insert comma-separated values in the right input field if you like to specify more than one value")
44      private final Map<String, String> requiredAttrs = new HashMap<>();
45  
46      @Schema(description =
47              "Insert comma-separated values in the right input field if you like to specify more than one value")
48      private final Map<String, String> rejectedAttrs = new HashMap<>();
49  
50      public int getOrder() {
51          return order;
52      }
53  
54      public void setOrder(final int order) {
55          this.order = order;
56      }
57  
58      public boolean isEnabled() {
59          return enabled;
60      }
61  
62      public void setEnabled(final boolean enabled) {
63          this.enabled = enabled;
64      }
65  
66      public boolean isSsoEnabled() {
67          return this.ssoEnabled;
68      }
69  
70      public void setSsoEnabled(final boolean ssoEnabled) {
71          this.ssoEnabled = ssoEnabled;
72      }
73  
74      public boolean isRequireAllAttributes() {
75          return requireAllAttributes;
76      }
77  
78      public void setRequireAllAttributes(final boolean requireAllAttributes) {
79          this.requireAllAttributes = requireAllAttributes;
80      }
81  
82      public boolean isCaseInsensitive() {
83          return caseInsensitive;
84      }
85  
86      public void setCaseInsensitive(final boolean caseInsensitive) {
87          this.caseInsensitive = caseInsensitive;
88      }
89  
90      public URI getUnauthorizedRedirectUrl() {
91          return unauthorizedRedirectUrl;
92      }
93  
94      public void setUnauthorizedRedirectUrl(final URI unauthorizedRedirectUrl) {
95          this.unauthorizedRedirectUrl = unauthorizedRedirectUrl;
96      }
97  
98      public Map<String, String> getRequiredAttrs() {
99          return requiredAttrs;
100     }
101 
102     public Map<String, String> getRejectedAttrs() {
103         return rejectedAttrs;
104     }
105 }