01: /*
02: * Copyright 2005-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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:
17: package org.acegisecurity.providers.portlet;
18:
19: import org.acegisecurity.GrantedAuthority;
20: import org.acegisecurity.providers.AbstractAuthenticationToken;
21:
22: /**
23: * <code>Authentication</code> implementation for JSR-168 Portlet authentication. <p>The
24: * corresponding authentication provider is {@link PortletAuthenticationProvider}.</p>
25: *
26: * @author John A. Lewis
27: * @since 2.0
28: * @version $Id$
29: */
30: public class PortletAuthenticationToken extends
31: AbstractAuthenticationToken {
32:
33: //~ Instance fields ================================================================================================
34:
35: private static final long serialVersionUID = 1L;
36:
37: private Object principal;
38: private Object credentials;
39:
40: //~ Constructors ===================================================================================================
41:
42: public PortletAuthenticationToken(Object principal,
43: Object credentials, GrantedAuthority[] authorities) {
44: super (authorities);
45: this .principal = principal;
46: this .credentials = credentials;
47: }
48:
49: //~ Methods ========================================================================================================
50:
51: public Object getPrincipal() {
52: return this .principal;
53: }
54:
55: public Object getCredentials() {
56: return this.credentials;
57: }
58:
59: }
|