Wt
4.11.1
|
#include <\brief>
Public Member Functions | |
OAuthClient () | |
Default constructor that creates an invalid OAuthClient. More... | |
OAuthClient (const std::string &id, const AbstractUserDatabase &db) | |
Constructor. More... | |
bool | checkValid () const |
Returns whether the user is valid. More... | |
std::string | id () const |
Returns the ID used to identify the client in the database. More... | |
std::string | clientId () const |
Returns the ID used to identify the client with the OpenID Connect provider and user. More... | |
bool | verifySecret (const std::string &secret) const |
Returns true if the given secret is correct for the given client. More... | |
std::set< std::string > | redirectUris () const |
Returns the set of redirect URI's that are valid for this client. More... | |
bool | confidential () const |
Returns whether the client is confidential or public. More... | |
ClientSecretMethod | authMethod () const |
Returns the client authentication method (see OIDC Core chapter 9) More... | |
OAuth 2.0 client implementing OpenID Connect, a.k.a. relying party.
This class represents a client. It is a value class that stores only the id and a reference to an AbstractUserDatabase to access its properties.
An object can point to a valid client, or be invalid. Invalid clients are typically used as return value for database queries which did not match with an existing client.
Wt::Auth::OAuthClient::OAuthClient | ( | ) |
Default constructor that creates an invalid OAuthClient.
Wt::Auth::OAuthClient::OAuthClient | ( | const std::string & | id, |
const AbstractUserDatabase & | db | ||
) |
Constructor.
Creates a client with id id
, and whose information is stored in the database
.
ClientSecretMethod Wt::Auth::OAuthClient::authMethod | ( | ) | const |
Returns the client authentication method (see OIDC Core chapter 9)
bool Wt::Auth::OAuthClient::checkValid | ( | ) | const |
Returns whether the user is valid.
A invalid user is a sentinel value returned by methods that query the database but could not identify a matching user.
std::string Wt::Auth::OAuthClient::clientId | ( | ) | const |
Returns the ID used to identify the client with the OpenID Connect provider and user.
This is the id that the client uses to identify itself with the identity provider.
bool Wt::Auth::OAuthClient::confidential | ( | ) | const |
Returns whether the client is confidential or public.
std::string Wt::Auth::OAuthClient::id | ( | ) | const |
Returns the ID used to identify the client in the database.
This returns the id that uniquely identifies the user, and acts as a "primary key" to obtain other information for the user in the database.
std::set< std::string > Wt::Auth::OAuthClient::redirectUris | ( | ) | const |
Returns the set of redirect URI's that are valid for this client.
bool Wt::Auth::OAuthClient::verifySecret | ( | const std::string & | secret | ) | const |
Returns true if the given secret is correct for the given client.