View Javadoc

1   /*
2    * Licensed to the University Corporation for Advanced Internet Development, 
3    * Inc. (UCAID) under one or more contributor license agreements.  See the 
4    * NOTICE file distributed with this work for additional information regarding
5    * copyright ownership. The UCAID licenses this file to You under the Apache 
6    * License, Version 2.0 (the "License"); you may not use this file except in 
7    * compliance with the License.  You may obtain a copy of the License at
8    *
9    *    http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package edu.internet2.middleware.shibboleth.idp.authn.provider;
19  
20  import java.io.Serializable;
21  
22  /** Represents a username and password entered used to authenticate a subject. */
23  public class UsernamePasswordCredential implements Serializable{
24  
25      /** Serial version UID. */
26      private static final long serialVersionUID = -5262041398037656037L;
27  
28      /** Username of a subject. */
29      private String username;
30  
31      /** Password of a subject. */
32      private String password;
33  
34      /**
35       * Constructor.
36       * 
37       * @param name username of the subject
38       * @param pass password of the subject
39       */
40      public UsernamePasswordCredential(String name, String pass) {
41          username = name;
42          password = pass;
43      }
44  
45      /**
46       * Gets the username of the subject.
47       * 
48       * @return username of the subject
49       */
50      public String getUsername() {
51          return username;
52      }
53  
54      /**
55       * Gets the password of the subject.
56       * 
57       * @return password of the subject
58       */
59      public String getPassword() {
60          return password;
61      }
62  }