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.auth;
20  
21  import java.util.LinkedHashMap;
22  import java.util.Map;
23  
24  public abstract class AbstractOAuth20AuthModuleConf extends Pac4jAuthModuleConf {
25  
26      private static final long serialVersionUID = -4716170241796764061L;
27  
28      protected String clientId;
29  
30      protected String clientSecret;
31  
32      protected boolean enabled;
33  
34      protected Map<String, String> customParams = new LinkedHashMap<>();
35  
36      protected String tokenUrl;
37  
38      protected String responseType = "code";
39  
40      protected String scope;
41  
42      protected String userIdAttribute;
43  
44      public String getClientId() {
45          return clientId;
46      }
47  
48      public void setId(final String clientId) {
49          this.clientId = clientId;
50      }
51  
52      public String getClientSecret() {
53          return clientSecret;
54      }
55  
56      public void setClientSecret(final String clientSecret) {
57          this.clientSecret = clientSecret;
58      }
59  
60      public boolean isEnabled() {
61          return enabled;
62      }
63  
64      public void setEnabled(final boolean enabled) {
65          this.enabled = enabled;
66      }
67  
68      public Map<String, String> getCustomParams() {
69          return customParams;
70      }
71  
72      public void setCustomParams(final Map<String, String> customParams) {
73          this.customParams = customParams;
74      }
75  
76      public String getTokenUrl() {
77          return tokenUrl;
78      }
79  
80      public void setTokenUrl(final String tokenUrl) {
81          this.tokenUrl = tokenUrl;
82      }
83  
84      public String getResponseType() {
85          return responseType;
86      }
87  
88      public void setResponseType(final String responseType) {
89          this.responseType = responseType;
90      }
91  
92      public String getScope() {
93          return scope;
94      }
95  
96      public void setScope(final String scope) {
97          this.scope = scope;
98      }
99  
100     public void setClientId(final String clientId) {
101         this.clientId = clientId;
102     }
103 
104     public String getUserIdAttribute() {
105         return userIdAttribute;
106     }
107 
108     public void setUserIdAttribute(final String userIdAttribute) {
109         this.userIdAttribute = userIdAttribute;
110     }
111 }