xref: /AOO41X/main/offapi/com/sun/star/auth/XSSOPasswordCache.idl (revision d695a2a01c88463caf485fe1626e0c4587baa3be)
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_XSSOPasswordCache_idl__
25#define __com_sun_star_auth_XSSOPasswordCache_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.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/** supports password caching for security mechanisms which use passwords as
38    credentials or as an input to credential creation but don't have
39    an external method to cache these passwords.
40
41    @since OpenOffice 1.1.2
42 */
43
44published interface XSSOPasswordCache : ::com::sun::star::uno::XInterface
45{
46    /** adds a username/password combination to the cache.
47        <P>
48        If an entry for the specified username already exists in the cache, it
49        will be overwritten.
50
51        @param UserName
52        the user name to add
53
54        @param Password
55        the associated password
56
57        @param Persist
58        indicates whether or not the username/password combination should be
59        persisted
60     */
61    void    addPassword( [in] string UserName,
62                         [in] string Password,
63                         [in] boolean Persist )
64                raises( InvalidArgumentException,
65                        PersistenceFailureException );
66
67    /** retrieves a password for a given user from the cache.
68        <P>
69        Non persistent cache is searched first, followed by the
70        persistent cache ( if it exists ).
71
72        @param UserName
73        the name of the user whose password should be retrieved
74
75        @param Persist
76        indicates whether or not the password is persistent
77
78        @returns
79        the required password
80     */
81    string  getPassword( [in] string UserName, [out] boolean Persist )
82                raises( InvalidArgumentException,
83                        PersistenceFailureException );
84
85    /** removes a password from the cache
86
87        @param UserName
88        the name of the user whose password should be removed.
89
90        @param RemovePersist
91        indicates whether or not the password should also be removed, if
92        present, from persistent cache.
93     */
94    void    removePassword( [in] string UserName, [in] boolean RemovePersist )
95                raises( InvalidArgumentException,
96                        PersistenceFailureException );
97};
98
99}; }; }; };
100
101#endif
102