Stay organized with collections
Save and categorize content based on your preferences.
firebase::auth::Credential
#include <credential.h>
Authentication credentials for an authentication provider.
Summary
An authentication provider is a service that allows you to authenticate a user. Firebase provides email/password authentication, but there are also external authentication providers such as Facebook.
Inheritance
Direct Known Subclasses:
firebase::auth::PhoneAuthCredential
Public functions
|
is_valid() const
|
bool
Get whether this credential is valid.
|
operator=(const Credential & rhs)
|
|
provider() const
|
std::string
Gets the name of the Identification Provider (IDP) for the credential.
|
Public functions
is_valid
bool is_valid() const
Get whether this credential is valid.
A credential can be invalid in an error condition, e.g. empty username/password.
Details |
Returns
|
True if the credential is valid, false otherwise.
|
provider
std::string provider() const
Gets the name of the Identification Provider (IDP) for the credential.
~Credential
~Credential()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.
[null,null,["Last updated 2024-01-23 UTC."],[],[],null,["# firebase::auth::Credential Class Reference\n\nfirebase::auth::Credential\n==========================\n\n\n`#include \u003ccredential.h\u003e`\n\nAuthentication credentials for an authentication provider.\n\nSummary\n-------\n\nAn authentication provider is a service that allows you to authenticate a user. Firebase provides email/password authentication, but there are also external authentication providers such as Facebook.\n\n### Inheritance\n\nDirect Known Subclasses:[firebase::auth::PhoneAuthCredential](/docs/reference/cpp/class/firebase/auth/phone-auth-credential)\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Credential](#classfirebase_1_1auth_1_1_credential_1a92a6a552e35c83a72896b5373d5f3066)`()` ||\n| [Credential](#classfirebase_1_1auth_1_1_credential_1a223c90e467c2188935903e3d13e02a4f)`(const `[Credential](/docs/reference/cpp/class/firebase/auth/credential#classfirebase_1_1auth_1_1_credential)` & rhs)` Copy constructor. ||\n| [~Credential](#classfirebase_1_1auth_1_1_credential_1a80200c59cf0ff15180eb7d699f6f13c1)`()` ||\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [is_valid](#classfirebase_1_1auth_1_1_credential_1a099cda6f9904b6c3d758b55565f2b770)`() const ` | `bool` Get whether this credential is valid. |\n| [operator=](#classfirebase_1_1auth_1_1_credential_1a75e6d30bf8ddbfe2fbdb6a0e69b22399)`(const `[Credential](/docs/reference/cpp/class/firebase/auth/credential#classfirebase_1_1auth_1_1_credential)` & rhs)` | [Credential](/docs/reference/cpp/class/firebase/auth/credential#classfirebase_1_1auth_1_1_credential)` &` Copy a [Credential](/docs/reference/cpp/class/firebase/auth/credential#classfirebase_1_1auth_1_1_credential). |\n| [provider](#classfirebase_1_1auth_1_1_credential_1a1c9a7968c43f57d829c8360306068433)`() const ` | `std::string` Gets the name of the Identification Provider (IDP) for the credential. |\n\nPublic functions\n----------------\n\n### Credential\n\n```c++\n Credential()\n``` \n\n### Credential\n\n```c++\n Credential(\n const Credential & rhs\n)\n``` \nCopy constructor. \n\n### is_valid\n\n```c++\nbool is_valid() const \n``` \nGet whether this credential is valid.\n\nA credential can be invalid in an error condition, e.g. empty username/password.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|---------------------------------------------------|\n| **Returns** | True if the credential is valid, false otherwise. |\n\n### operator=\n\n```c++\nCredential & operator=(\n const Credential & rhs\n)\n``` \nCopy a [Credential](/docs/reference/cpp/class/firebase/auth/credential#classfirebase_1_1auth_1_1_credential). \n\n### provider\n\n```c++\nstd::string provider() const \n``` \nGets the name of the Identification Provider (IDP) for the credential. \n\n### \\~Credential\n\n```c++\n ~Credential()\n```"]]