Question

I have been working on an account manager in android to maintain a separate account for my app. I searched through many sites, but I couldn't understand the meaning of authTokenType. I want to know whether the authTokenType is generated by the server dynamically for every user or if it is a static string used for all the users by the app itself.

Thanks in advance.

Was it helpful?

Solution

The authTokenType specifies what kind of token you you are trying to get when you're calling (among others) the GetAuthToken methods in the AccountManager.

Some account authenticators only use one authTokenType and others, such as the authenticator for Google accounts can issue many different types of tokens with different permissions. You can get a list of OAuth 2.0 related tokens for Google at the Google OAuth 2.0 playground. For example the AuthTokenType for getting the user's email from a Google account is "https://www.googleapis.com/auth/userinfo.email".

The authTokenType nothing that is server generated and if you are using the account manager to manage your own account type you should be able to decide yourself what your token type should be for your accounts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top