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 java.io.Serializable;
22  
23  public class DefaultTicketExpirationPolicyConf implements TicketExpirationPolicyConf {
24  
25      private static final long serialVersionUID = -6177632746685440169L;
26  
27      public static class TGTConf implements Serializable {
28  
29          private static final long serialVersionUID = 4020295776618112940L;
30  
31          /**
32           * TTL of this ticket, in seconds.
33           */
34          private long maxTimeToLiveInSeconds;
35  
36          public long getMaxTimeToLiveInSeconds() {
37              return maxTimeToLiveInSeconds;
38          }
39  
40          public void setMaxTimeToLiveInSeconds(final long maxTimeToLiveInSeconds) {
41              this.maxTimeToLiveInSeconds = maxTimeToLiveInSeconds;
42          }
43      }
44  
45      public static class STConf extends TGTConf {
46  
47          private static final long serialVersionUID = -9141008704559934825L;
48  
49          /**
50           * Number of times this ticket can be used.
51           */
52          private long numberOfUses;
53  
54          public long getNumberOfUses() {
55              return numberOfUses;
56          }
57  
58          public void setNumberOfUses(final long numberOfUses) {
59              this.numberOfUses = numberOfUses;
60          }
61      }
62  
63      private TGTConf tgtConf;
64  
65      private STConf stConf;
66  
67      private TGTConf proxyTgtConf;
68  
69      private STConf proxyStConf;
70  
71      public TGTConf getTgtConf() {
72          return tgtConf;
73      }
74  
75      public void setTgtConf(final TGTConf tgtConf) {
76          this.tgtConf = tgtConf;
77      }
78  
79      public STConf getStConf() {
80          return stConf;
81      }
82  
83      public void setStConf(final STConf stConf) {
84          this.stConf = stConf;
85      }
86  
87      public TGTConf getProxyTgtConf() {
88          return proxyTgtConf;
89      }
90  
91      public void setProxyTgtConf(final TGTConf proxyTgtConf) {
92          this.proxyTgtConf = proxyTgtConf;
93      }
94  
95      public STConf getProxyStConf() {
96          return proxyStConf;
97      }
98  
99      public void setProxyStConf(final STConf proxySTConf) {
100         this.proxyStConf = proxySTConf;
101     }
102 }