IAccountAuthenticator.aidl revision ffd0cb04f97e62d286d185c520580d81a9c328b1
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. 25603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 26603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintanaoneway interface IAccountAuthenticator { 27603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 28603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * prompts the user for account information and adds the result to the IAccountManager 29603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 30a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana void addAccount(in IAccountAuthenticatorResponse response, String accountType, 313326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana String authTokenType, in String[] requiredFeatures, in Bundle options); 32603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 33603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 34a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana * Checks that the account/password combination is valid. 35a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana * @deprecated 36603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 37a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana void confirmPassword(in IAccountAuthenticatorResponse response, 38a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana in Account account, String password); 39603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 40603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 41a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana * prompts the user for the credentials of the account 42603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 43a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana void confirmCredentials(in IAccountAuthenticatorResponse response, in Account account); 44603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 45603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 46a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana * gets the password by either prompting the user or querying the IAccountManager 47603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 48a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana void getAuthToken(in IAccountAuthenticatorResponse response, in Account account, 49a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana String authTokenType, in Bundle options); 50603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 51603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 52d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana * Gets the user-visible label of the given authtoken type. 53d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana */ 54d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana void getAuthTokenLabel(in IAccountAuthenticatorResponse response, String authTokenType); 55d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana 56d4a1d2e14297a3387fdb5761090961e714370492Fred Quintana /** 57603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * prompts the user for a new password and writes it to the IAccountManager 58603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 59a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana void updateCredentials(in IAccountAuthenticatorResponse response, in Account account, 60a698f4276968d078b1b9e2f3738c4f559a3307b2Fred Quintana String authTokenType, in Bundle options); 61603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 62603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 63603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * launches an activity that lets the user edit and set the properties for an authenticator 64603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 65603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void editProperties(in IAccountAuthenticatorResponse response, String accountType); 663326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana 673326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana /** 683326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana * returns a Bundle where the boolean value BOOLEAN_RESULT_KEY is set if the account has the 693326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana * specified features 703326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana */ 713326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana void hasFeatures(in IAccountAuthenticatorResponse response, in Account account, 723326920329cecb57c7ff1fc5c6add5c98aab9ed9Fred Quintana in String[] features); 73ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana 74ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana /** 75ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana * Gets whether or not the account is allowed to be removed. 76ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana */ 77ffd0cb04f97e62d286d185c520580d81a9c328b1Fred Quintana void getAccountRemovalAllowed(in IAccountAuthenticatorResponse response, in Account account); 78603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana} 79