xentara-plugin v2.0.4
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::security::Oauth2Authenticator Class Reference

An authenticator that uses OAuth 2.0 compatible JSON web tokens. More...

#include <xentara/security/Oauth2Authenticator.hpp>

Public Member Functions

internal auto authenticate (std::string_view encodedToken, const Oauth2Scope &scope={}) const -> utils::eh::expected< Authorization, std::error_code >
 Authenticate using a JSON web token.
 

Detailed Description

An authenticator that uses OAuth 2.0 compatible JSON web tokens.

Member Function Documentation

◆ authenticate()

internal auto xentara::security::Oauth2Authenticator::authenticate ( std::string_view  encodedToken,
const Oauth2Scope scope = {} 
) const -> utils::eh::expected< Authorization, std::error_code >

Authenticate using a JSON web token.

Parameters
encodedTokenThe raw base64url encoded JSON web token.
Returns
Returns an authorization object, or an error code on error.
Parameters
scopeThe OAUth 2.0 scope value the token must contain. If you pass a default constructed Oauth2Scope object, the default scope configured in the Xentara OAuth 2.0 configuration will be used.