01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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 org.apache.jetspeed.sso.impl;
19:
20: import java.io.Serializable;
21:
22: import org.apache.jetspeed.sso.SSOContext;
23:
24: /**
25: * SSOContextImpl
26: * Class holding credential information
27: *
28: * @author <a href="mailto:rogerrut@apache.org">Roger Ruttimann</a>
29: * @version $Id: SSOContextImpl.java 516448 2007-03-09 16:25:47Z ate $
30: */
31: public class SSOContextImpl implements SSOContext, Serializable {
32: private long remotePrincipalId;
33: private String remoteCredential;
34: private String remotePrincipal;
35: private String portalPrincipal;
36:
37: /**
38: * Constructor takes all arguments since members can't be altered
39: */
40: public SSOContextImpl(long remotePrincipalId,
41: String remotePrincipal, String remoteCredential) {
42: super ();
43: this .remotePrincipalId = remotePrincipalId;
44: this .remotePrincipal = remotePrincipal;
45: this .remoteCredential = remoteCredential;
46: }
47:
48: public SSOContextImpl(long remotePrincipalId,
49: String remotePrincipal, String remoteCredential,
50: String portalPrincipal) {
51: super ();
52: this .remotePrincipalId = remotePrincipalId;
53: this .remotePrincipal = remotePrincipal;
54: this .remoteCredential = remoteCredential;
55: this .portalPrincipal = portalPrincipal;
56: }
57:
58: /* (non-Javadoc)
59: * @see org.apache.jetspeed.sso.SSOContext#getRemotePrincipalId()
60: */
61: public long getRemotePrincipalId() {
62: return this .remotePrincipalId;
63: }
64:
65: /* (non-Javadoc)
66: * @see org.apache.jetspeed.sso.SSOContext#getRemotePrincipal()
67: */
68: public String getRemotePrincipalName() {
69: return this .remotePrincipal;
70: }
71:
72: /* (non-Javadoc)
73: * @see org.apache.jetspeed.sso.SSOContext#getRemoteCredential()
74: */
75: public String getRemoteCredential() {
76: return this .remoteCredential;
77: }
78:
79: /* (non-Javadoc)
80: * @see org.apache.jetspeed.sso.SSOContext#getPortalPrincipal()
81: */
82: public String getPortalPrincipalName() {
83: return this.portalPrincipal;
84: }
85:
86: }
|