View Javadoc
1   /**
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements. See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership. The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License. You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied. See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.wss4j.common.kerberos;
20  
21  import java.security.Key;
22  import java.security.Principal;
23  
24  import org.ietf.jgss.GSSContext;
25  import org.ietf.jgss.GSSCredential;
26  
27  
28  public class KerberosServiceContext {
29  
30      private Principal principal;
31      private Key sessionKey;
32      private GSSCredential delegationCredential;
33      private GSSContext gssContext;
34      private byte[] kerberosToken;
35  
36      /**
37       * @return the principal
38       */
39      public Principal getPrincipal() {
40          return principal;
41      }
42  
43      /**
44       * @param principal the principal to set
45       */
46      public void setPrincipal(Principal principal) {
47          this.principal = principal;
48      }
49  
50      /**
51       * @return the sessionKey
52       */
53      public Key getSessionKey() {
54          return sessionKey;
55      }
56  
57      /**
58       * @param sessionKey the sessionKey to set
59       */
60      public void setSessionKey(Key sessionKey) {
61          this.sessionKey = sessionKey;
62      }
63  
64      public GSSCredential getDelegationCredential() {
65          return delegationCredential;
66      }
67  
68      public void setDelegationCredential(GSSCredential delegationCredential) {
69          this.delegationCredential = delegationCredential;
70      }
71  
72      public GSSContext getGssContext() {
73          return gssContext;
74      }
75  
76      public void setGssContext(GSSContext gssContext) {
77          this.gssContext = gssContext;
78      }
79  
80      public byte[] getKerberosToken() {
81          return kerberosToken;
82      }
83  
84      public void setKerberosToken(byte[] kerberosToken) {
85          this.kerberosToken = kerberosToken;
86      }
87  
88  }