1 /**
2 * Copyright 2005-2012 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.ksb.security.credentials;
17
18 import org.kuali.rice.core.api.security.credentials.Credentials;
19 import org.springframework.util.Assert;
20
21 /**
22 *
23 * @author Kuali Rice Team (rice.collab@kuali.org)
24 * @since 0.9
25 *
26 */
27 public final class UsernamePasswordCredentials implements Credentials {
28
29 private final String username;
30
31 private final String password;
32
33 public UsernamePasswordCredentials(final String username, final String password) {
34 this.username = username;
35 this.password = password;
36
37 Assert.notNull(this.username, "username cannote be null.");
38 Assert.notNull(this.password, "password cannote be null.");
39 }
40
41 public String getPassword() {
42 return this.password;
43 }
44
45 public String getUsername() {
46 return this.username;
47 }
48
49
50
51 }