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  import org.apache.syncope.common.lib.to.AuthModuleTO;
24  
25  public class OAuth20AuthModuleConf extends AbstractOAuth20AuthModuleConf implements AuthModuleConf {
26  
27      private static final long serialVersionUID = 299820485764241682L;
28  
29      protected String authUrl;
30  
31      protected String profileUrl;
32  
33      protected Map<String, String> profileAttrs = new LinkedHashMap<>();
34  
35      protected boolean withState;
36  
37      protected String profilePath;
38  
39      protected String profileVerb = "POST";
40  
41      public String getAuthUrl() {
42          return authUrl;
43      }
44  
45      public void setAuthUrl(final String authUrl) {
46          this.authUrl = authUrl;
47      }
48  
49      public Map<String, String> getProfileAttrs() {
50          return profileAttrs;
51      }
52  
53      public void setProfileAttrs(final Map<String, String> profileAttrs) {
54          this.profileAttrs = profileAttrs;
55      }
56  
57      public boolean isWithState() {
58          return withState;
59      }
60  
61      public void setWithState(final boolean withState) {
62          this.withState = withState;
63      }
64  
65      public String getProfilePath() {
66          return profilePath;
67      }
68  
69      public void setProfilePath(final String profilePath) {
70          this.profilePath = profilePath;
71      }
72  
73      public String getProfileUrl() {
74          return profileUrl;
75      }
76  
77      public void setProfileUrl(final String profileUrl) {
78          this.profileUrl = profileUrl;
79      }
80  
81      public String getProfileVerb() {
82          return profileVerb;
83      }
84  
85      public void setProfileVerb(final String profileVerb) {
86          this.profileVerb = profileVerb;
87      }
88  
89      @Override
90      public Map<String, Object> map(final AuthModuleTO authModule, final Mapper mapper) {
91          return mapper.map(authModule, this);
92      }
93  }