public class AuthzService
extends android.app.Service
| Modifier and Type | Class and Description |
|---|---|
static class |
AuthzService.AGAuthzServiceConnection
Defines callbacks for service binding, passed to bindService()
|
static class |
AuthzService.AuthzBinder |
START_CONTINUATION_MASK, START_FLAG_REDELIVERY, START_FLAG_RETRY, START_NOT_STICKY, START_REDELIVER_INTENT, START_STICKY, START_STICKY_COMPATIBILITYACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_ROUTER_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE| Constructor and Description |
|---|
AuthzService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccount(OAuth2AuthzSession account)
Put a session into the store.
|
String |
fetchAccessToken(String accountId,
AuthzConfig config)
This will exchange an Authorization token for an Access Token
|
OAuth2AuthzSession |
getAccount(String accountId)
Returns the OAuth2AuthzSession for accountId if any
|
List<String> |
getAccounts()
Fetches all OAuth2AuthzSessions in the system.
|
protected HttpProvider |
getHttpProvider(URL url)
This method allows an implementation to change how the HttpProvider is
fetched.
|
boolean |
hasAccount(String accountId)
Will check if there is an account which has previously been granted an
authorization code and access code
|
android.os.IBinder |
onBind(android.content.Intent intent) |
void |
onCreate() |
boolean |
onUnbind(android.content.Intent intent) |
dump, getApplication, onConfigurationChanged, onDestroy, onLowMemory, onRebind, onStart, onStartCommand, onTaskRemoved, onTrimMemory, startForeground, stopForeground, stopSelf, stopSelf, stopSelfResultattachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterReceiverpublic void onCreate()
onCreate in class android.app.Servicepublic String fetchAccessToken(String accountId, AuthzConfig config) throws OAuth2AuthorizationException
accountId - the ID for the OAuth2AuthzSessionconfig - the configOAuth2AuthorizationException - if something went wrong in the
exchangepublic void addAccount(OAuth2AuthzSession account)
account - a new sessionpublic boolean hasAccount(String accountId)
accountId - the accountId to checkpublic OAuth2AuthzSession getAccount(String accountId)
accountId - the accountId to look uppublic List<String> getAccounts()
public android.os.IBinder onBind(android.content.Intent intent)
onBind in class android.app.Servicepublic boolean onUnbind(android.content.Intent intent)
onUnbind in class android.app.Serviceprotected HttpProvider getHttpProvider(URL url)
url - the url endpointCopyright © 2014 JBoss by Red Hat. All rights reserved.