IAccountAuthenticator.aidl revision 603073430bbcb1bd29db7afb9b14e2732ad589fb
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; 20603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 21603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana/** 22603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * Service that allows the interaction with an authentication server. 23603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 24603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintanaoneway interface IAccountAuthenticator { 25603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 26603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * prompts the user for account information and adds the result to the IAccountManager 27603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 28603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void addAccount(in IAccountAuthenticatorResponse response, String accountType); 29603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 30603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 31603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * prompts the user for the credentials of the account 32603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 33603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void authenticateAccount(in IAccountAuthenticatorResponse response, String name, 34603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana String type, String password); 35603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 36603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 37603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * gets the password by either prompting the user or querying the IAccountManager 38603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 39603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void getAuthToken(in IAccountAuthenticatorResponse response, 40603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana String name, String type, String authTokenType); 41603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 42603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 43603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * does local analysis or uses a service in the cloud 44603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 45603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void getPasswordStrength(in IAccountAuthenticatorResponse response, 46603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana String accountType, String password); 47603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 48603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 49603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * checks with the login service in the cloud 50603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 51603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void checkUsernameExistence(in IAccountAuthenticatorResponse response, 52603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana String accountType, String username); 53603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 54603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 55603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * prompts the user for a new password and writes it to the IAccountManager 56603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 57603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void updatePassword(in IAccountAuthenticatorResponse response, String name, String type); 58603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana 59603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana /** 60603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana * launches an activity that lets the user edit and set the properties for an authenticator 61603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana */ 62603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana void editProperties(in IAccountAuthenticatorResponse response, String accountType); 63603073430bbcb1bd29db7afb9b14e2732ad589fbFred Quintana} 64