1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_auth_XSSOInitiatorContext_idl__
25#define __com_sun_star_auth_XSSOInitiatorContext_idl__
26
27#ifndef __com_sun_star_auth_XSSOContext_idl__
28#include <com/sun/star/auth/XSSOContext.idl>
29#endif
30
31#ifndef __com_sun_star_auth_SSOExceptions_idl__
32#include <com/sun/star/auth/SSOExceptions.idl>
33#endif
34
35module com { module sun { module star { module auth {
36
37/** represents an initiator side security context.
38	<P>This context may be used to initialise authetication tokens to send to
39	an acceptor and to authenticate any token sent back in response.
40
41    @since OpenOffice 1.1.2
42 */
43published interface XSSOInitiatorContext : ::com::sun::star::auth::XSSOContext
44{
45	/** initialises an SSO Token to send to the acceptor side and
46	    authenticates an SSO Token returned by the acceptor if the
47		context supports mutual authentication.
48		<P>
49		init should be called only once for contexts which don't support
50		mutual authentication and at most twice for contexts which do
51		support mutual authentication. Additional calls produce undefined
52		results.
53
54		@param Token
55		the SSO token received from the acceptor side in response to an
56		authentication request. This token is ignored on the first call
57		to init and should only be specified for the second call on a
58		context supporting mutual authentication.
59
60		@returns
61		the sequence of bytes to be sent to the acceptor side as part of
62		an authentication request. This sequence will be non zero length
63		for the first call to init, zero length for the second call to init
64		on a context supporting mutual authentication and undefined in all
65		other cases.
66	 */
67	sequence< byte > init(	[in] sequence< byte > Token )
68		raises( InvalidArgumentException,
69				InvalidCredentialException,
70				InvalidContextException,
71				AuthenticationFailedException );
72};
73
74}; }; }; };
75
76#endif
77