1 package org.apache.archiva.redback.keys.memory;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import org.apache.archiva.redback.keys.AuthenticationKey;
24 import java.util.Date;
27 * MemoryAuthenticationKey
29 * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
32 public class MemoryAuthenticationKey
33 implements AuthenticationKey
37 private String forPrincipal;
39 private String purpose;
41 private Date dateCreated;
43 private Date dateExpires;
45 public Date getDateCreated()
50 public Date getDateExpires()
55 public String getForPrincipal()
60 public String getKey()
65 public String getPurpose()
70 public void setDateCreated( Date dateCreated )
72 this.dateCreated = dateCreated;
75 public void setDateExpires( Date dateExpires )
77 this.dateExpires = dateExpires;
80 public void setForPrincipal( String forPrincipal )
82 this.forPrincipal = forPrincipal;
85 public void setKey( String key )
90 public void setPurpose( String purpose )
92 this.purpose = purpose;
95 public String toString()
97 StringBuffer sb = new StringBuffer();
99 sb.append( "MemoryAuthenticationKey[" );
100 sb.append( "key=" ).append( key );
101 sb.append( ",forPrincipal=" ).append( forPrincipal );
102 sb.append( ",purpose=" ).append( purpose );
103 sb.append( ",dateCreated=" ).append( dateCreated );
104 sb.append( ",dateExpired=" ).append( dateExpires );
107 return sb.toString();