aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.cc
diff options
context:
space:
mode:
authorGravatar rsgowman <rgowman@google.com>2018-03-21 11:04:40 -0400
committerGravatar GitHub <noreply@github.com>2018-03-21 11:04:40 -0400
commit308acc09bfaf6dabf4b6d5f5e39f33854df8ce34 (patch)
tree3706bbbe40d08569795634fd2f30a07fd348b399 /Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.cc
parentd924771453d000e708bd5d239da3bae4feb489ac (diff)
Change CredentialsProvider::TokenListener to use StatusOr<Token> (#945)
* Change CredentialsProvider::TokenListener to use StatusOr Rather than a token plus error code/msg. * Eliminate the concept of an invalid Token Instead, we'll just use StatusOr<Token>. Note that unauthenticated tokens are handled as a special case; they're created via: Token::Unauthenticated() and are otherwise "valid", though attempting to retrieve the raw token on one of these tokens will cause an assertion failure.
Diffstat (limited to 'Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.cc')
-rw-r--r--Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.cc b/Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.cc
index 0fa70c0..da4198d 100644
--- a/Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.cc
+++ b/Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.cc
@@ -26,8 +26,9 @@ void EmptyCredentialsProvider::GetToken(bool force_refresh,
TokenListener completion) {
UNUSED(force_refresh);
if (completion) {
- // Invalid token will force the GRPC fallback to use default settings.
- completion(Token::Invalid(), FirestoreErrorCode::Ok, "");
+ // Unauthenticated token will force the GRPC fallback to use default
+ // settings.
+ completion(Token::Unauthenticated());
}
}