blob: 70c075208cb73f8183fb2bb0311dad1be42ea349 [file] [log] [blame]
Fred Quintana60307342009-03-24 22:48:12 -07001/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.accounts;
18
19import android.accounts.IAccountAuthenticatorResponse;
Fred Quintanaa698f422009-04-08 19:14:54 -070020import android.accounts.Account;
21import android.os.Bundle;
Fred Quintana60307342009-03-24 22:48:12 -070022
23/**
24 * Service that allows the interaction with an authentication server.
25 */
26oneway interface IAccountAuthenticator {
27 /**
28 * prompts the user for account information and adds the result to the IAccountManager
29 */
Fred Quintanaa698f422009-04-08 19:14:54 -070030 void addAccount(in IAccountAuthenticatorResponse response, String accountType,
31 String authTokenType, in Bundle options);
32
33 /**
34 * Checks that the account/password combination is valid.
35 * @deprecated
36 */
37 void confirmPassword(in IAccountAuthenticatorResponse response,
38 in Account account, String password);
Fred Quintana60307342009-03-24 22:48:12 -070039
40 /**
41 * prompts the user for the credentials of the account
42 */
Fred Quintanaa698f422009-04-08 19:14:54 -070043 void confirmCredentials(in IAccountAuthenticatorResponse response, in Account account);
Fred Quintana60307342009-03-24 22:48:12 -070044
45 /**
46 * gets the password by either prompting the user or querying the IAccountManager
47 */
Fred Quintanaa698f422009-04-08 19:14:54 -070048 void getAuthToken(in IAccountAuthenticatorResponse response, in Account account,
49 String authTokenType, in Bundle options);
Fred Quintana60307342009-03-24 22:48:12 -070050
51 /**
52 * prompts the user for a new password and writes it to the IAccountManager
53 */
Fred Quintanaa698f422009-04-08 19:14:54 -070054 void updateCredentials(in IAccountAuthenticatorResponse response, in Account account,
55 String authTokenType, in Bundle options);
Fred Quintana60307342009-03-24 22:48:12 -070056
57 /**
58 * launches an activity that lets the user edit and set the properties for an authenticator
59 */
60 void editProperties(in IAccountAuthenticatorResponse response, String accountType);
61}