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  
20  package org.apache.ws.security.saml;
21  
22  import javax.security.auth.callback.CallbackHandler;
23  
24  import org.apache.ws.security.WSSecurityException;
25  import org.apache.ws.security.components.crypto.Crypto;
26  import org.apache.ws.security.saml.ext.AssertionWrapper;
27  
28  /**
29   * Builds a WS SAML Assertion and inserts it into the SOAP Envelope.
30   * Refer to the WS specification, SAML Token profile
31   *
32   * @author Davanum Srinivas (dims@yahoo.com).
33   */
34  public interface SAMLIssuer {
35  
36      /**
37       * Creates a new <code>AssertionWrapper</code>.
38       * 
39       * A complete <code>AssertionWrapper</code> is constructed.
40       *
41       * @return AssertionWrapper
42       * @throws WSSecurityException
43       */
44      AssertionWrapper newAssertion() throws WSSecurityException;
45      
46      /**
47       * Set whether to send the key value or whether to include the entire cert.
48       * @param sendKeyValue whether to send the key value.
49       */
50      void setSendKeyValue(boolean sendKeyValue);
51      
52      /**
53       * Get whether to send the key value or whether to include the entire cert.
54       * @return whether to send the key value
55       */
56      boolean isSendKeyValue();
57      
58      /**
59       * Set whether to sign the assertion or not.
60       * @param signAssertion whether to sign the assertion or not.
61       */
62      void setSignAssertion(boolean signAssertion);
63      
64      /**
65       * Get whether to sign the assertion or not
66       * @return whether to sign the assertion or not
67       */
68      boolean isSignAssertion();
69      
70      /**
71       * Set the CallbackHandler to use
72       * @param callbackHandler the CallbackHandler to use
73       */
74      void setCallbackHandler(CallbackHandler callbackHandler);
75      
76      /**
77       * Get the CallbackHandler in use
78       * @return the CallbackHandler in use
79       */
80      CallbackHandler getCallbackHandler();
81      
82      /**
83       * Set the issuer crypto
84       * @param issuerCrypto the issuer crypto
85       */
86      void setIssuerCrypto(Crypto issuerCrypto);
87  
88      /**
89       * @return Returns the issuerCrypto.
90       */
91      Crypto getIssuerCrypto();
92      
93      /**
94       * Set the issuer name
95       * @param issuer the issuer name
96       */
97      void setIssuerName(String issuer);
98      
99      /**
100      * Get the issuer name
101      * @return the issuer name
102      */
103     String getIssuerName();
104     
105     /**
106      * Set the issuer key name
107      * @param issuerKeyName the issuer key name
108      */
109     void setIssuerKeyName(String issuerKeyName);
110 
111     /**
112      * @return Returns the issuerKeyName.
113      */
114     String getIssuerKeyName();
115 
116     /**
117      * Set the issuer key password
118      * @param issuerKeyPassword the issuerKeyPassword.
119      */
120     void setIssuerKeyPassword(String issuerKeyPassword);
121     
122     /**
123      * @return Returns the issuerKeyPassword.
124      */
125     String getIssuerKeyPassword();
126 
127 }