IAccountAuthenticator.aidl revision 67df64b3a48a8157d08a98fa90135d0ac0ee621c
1603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana/* 2603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * Copyright (C) 2009 The Android Open Source Project 3603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * 4603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * Licensed under the Apache License, Version 2.0 (the "License"); 5603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * you may not use this file except in compliance with the License. 6603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * You may obtain a copy of the License at 7603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * 8603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * http://www.apache.org/licenses/LICENSE-2.0 9603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * 10603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * Unless required by applicable law or agreed to in writing, software 11603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * distributed under the License is distributed on an "AS IS" BASIS, 12603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * See the License for the specific language governing permissions and 14603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * limitations under the License. 15603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 16603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 17603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintanapackage android.accounts; 18603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 19603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintanaimport android.accounts.IAccountAuthenticatorResponse; 20a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintanaimport android.accounts.Account; 21a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintanaimport android.os.Bundle; 22603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 23603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana/** 24603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * Service that allows the interaction with an authentication server. 25f7ae77cd67f1a3993b8e56c1af4720a7adf4e69dFred Quintana * @hide 26603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 27603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintanaoneway interface IAccountAuthenticator { 28603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 29603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * prompts the user for account information and adds the result to the IAccountManager 30603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 31a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana void addAccount(in IAccountAuthenticatorResponse response, String accountType, 323326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana String authTokenType, in String[] requiredFeatures, in Bundle options); 33603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 34603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 35a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana * prompts the user for the credentials of the account 36603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 37f7ae77cd67f1a3993b8e56c1af4720a7adf4e69dFred Quintana void confirmCredentials(in IAccountAuthenticatorResponse response, in Account account, 38f7ae77cd67f1a3993b8e56c1af4720a7adf4e69dFred Quintana in Bundle options); 39603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 40603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 41a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana * gets the password by either prompting the user or querying the IAccountManager 42603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 43a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana void getAuthToken(in IAccountAuthenticatorResponse response, in Account account, 44a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana String authTokenType, in Bundle options); 45603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 46603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 47d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana * Gets the user-visible label of the given authtoken type. 48d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana */ 49d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana void getAuthTokenLabel(in IAccountAuthenticatorResponse response, String authTokenType); 50d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana 51d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana /** 52603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * prompts the user for a new password and writes it to the IAccountManager 53603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 54a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana void updateCredentials(in IAccountAuthenticatorResponse response, in Account account, 55a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana String authTokenType, in Bundle options); 56603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 57603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 58603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * launches an activity that lets the user edit and set the properties for an authenticator 59603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 60603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void editProperties(in IAccountAuthenticatorResponse response, String accountType); 613326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana 623326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana /** 633326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana * returns a Bundle where the boolean value BOOLEAN_RESULT_KEY is set if the account has the 643326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana * specified features 653326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana */ 663326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana void hasFeatures(in IAccountAuthenticatorResponse response, in Account account, 673326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana in String[] features); 68ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana 69ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana /** 70ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana * Gets whether or not the account is allowed to be removed. 71ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana */ 72ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana void getAccountRemovalAllowed(in IAccountAuthenticatorResponse response, in Account account); 7367df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani 7467df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani /** 7567df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani * Returns a Bundle containing the required credentials to copy the account across users. 7667df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani */ 7767df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani void getAccountCredentialsForCloning(in IAccountAuthenticatorResponse response, 7867df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani in Account account); 7967df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani 8067df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani /** 8167df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani * Uses the Bundle containing credentials from another instance of the authenticator to create 8267df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani * a copy of the account on this user. 8367df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani */ 8467df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani void addAccountFromCredentials(in IAccountAuthenticatorResponse response, in Account account, 8567df64b3a48a8157d08a98fa90135d0ac0ee621cAmith Yamasani in Bundle accountCredentials); 86603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana} 87