diff options
author | oleksii stepanian <aste@google.com> | 2015-10-27 17:45:30 -0700 |
---|---|---|
committer | oleksii stepanian <aste@google.com> | 2015-10-27 17:45:30 -0700 |
commit | 7721ae67daf0231d57669c43a6e666d8c052c5bb (patch) | |
tree | 3679d9bec5d4b7705ef26492241f590e4ba21b99 | |
parent | 60e68e02a866685aaae8ec05479d30a5dc1598f6 (diff) | |
download | volley-7721ae67daf0231d57669c43a6e666d8c052c5bb.tar.gz |
Add API to get Auth Token Type used by authenticator.
When using different auth protocols e.g. ClientLogin and
OAuth2 it is important to know the type of the token in order
to construct "Authorization" header. Currently we have to
store auth token vaue/auth token type association elsewhere
which makes it a subject for errors.
Change-Id: I3b8c05672f5394ad806f257c9f6bb378ebf990d7
-rw-r--r-- | src/main/java/com/android/volley/toolbox/AndroidAuthenticator.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/android/volley/toolbox/AndroidAuthenticator.java b/src/main/java/com/android/volley/toolbox/AndroidAuthenticator.java index bdf7091..18f8597 100644 --- a/src/main/java/com/android/volley/toolbox/AndroidAuthenticator.java +++ b/src/main/java/com/android/volley/toolbox/AndroidAuthenticator.java @@ -73,6 +73,13 @@ public class AndroidAuthenticator implements Authenticator { return mAccount; } + /** + * Returns the Auth Token Type used by this authenticator. + */ + public String getAuthTokenType() { + return mAuthTokenType; + } + // TODO: Figure out what to do about notifyAuthFailure @SuppressWarnings("deprecation") @Override |