Wt  3.7.1
Public Member Functions | List of all members
Wt::Auth::OAuthClient Class Reference

#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...
 

Detailed Description

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.

See also
AbstractUserDatabase

Constructor & Destructor Documentation

◆ OAuthClient() [1/2]

Wt::Auth::OAuthClient::OAuthClient ( )

Default constructor that creates an invalid OAuthClient.

See also
checkValid()

◆ OAuthClient() [2/2]

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.

Member Function Documentation

◆ authMethod()

ClientSecretMethod Wt::Auth::OAuthClient::authMethod ( ) const

Returns the client authentication method (see OIDC Core chapter 9)

See also
AbstractUserDatabase::idpClientAuthMethod()

◆ checkValid()

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.

◆ clientId()

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.

See also
AbstractUserDatabase::idpClientId()

◆ confidential()

bool Wt::Auth::OAuthClient::confidential ( ) const

Returns whether the client is confidential or public.

See also
AbstractUserDatabase::idpClientConfidential()

◆ id()

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.

◆ redirectUris()

std::set< std::string > Wt::Auth::OAuthClient::redirectUris ( ) const

Returns the set of redirect URI's that are valid for this client.

See also
AbstractUserDatabase::idpClientRedirectUris()

◆ verifySecret()

bool Wt::Auth::OAuthClient::verifySecret ( const std::string &  secret) const

Returns true if the given secret is correct for the given client.

See also
AbstractUserDatabase::verifySecret()

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13