public class OAuth2AuthzService
extends android.app.Service
| Modifier and Type | Class and Description |
|---|---|
static class |
OAuth2AuthzService.AGAuthzServiceConnection
Defines callbacks for service binding, passed to bindService()
|
static class |
OAuth2AuthzService.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, APP_OPS_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, BLUETOOTH_SERVICE, CAPTIONING_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_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, PRINT_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE| Constructor and Description |
|---|
OAuth2AuthzService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccount(OAuth2AuthzSession account)
Put a session into the store.
|
String |
fetchAccessToken(String accountId,
org.jboss.aerogear.android.impl.authz.oauth2.OAuth2Properties 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 org.jboss.aerogear.android.http.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) |
void |
removeAccount(String accountId)
Removes the account with the provided ID
|
dump, getApplication, onConfigurationChanged, onDestroy, onLowMemory, onRebind, onStart, onStartCommand, onTaskRemoved, onTrimMemory, startForeground, stopForeground, stopSelf, stopSelf, stopSelfResultattachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, 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, org.jboss.aerogear.android.impl.authz.oauth2.OAuth2Properties 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 org.jboss.aerogear.android.http.HttpProvider getHttpProvider(URL url)
url - the url endpointpublic void removeAccount(String accountId)
accountId - Copyright © 2014 JBoss by Red Hat. All rights reserved.