10Duke Scale C++ Client
Loading...
Searching...
No Matches
BrowserAuthenticationConfig Class Reference

#include <BrowserAuthenticationConfig.h>

Detailed Description

Configuration for "default OS-browser"-based authentication.

NOTE: The "default osbowser" authentication requires an HTTP response, which is served after successful login. This response is configured with the field httpResponseAfterSuccessfulLogin. The response is a full HTTP response message, containing status line, headers and message body. Serving an entire response allows the developer to use either static page but also do redirects, if wanted. Simple example message:

"HTTP/1.1 200 OK\n"
"Content-Type: text/html; charset=utf-8\n"
"\n"
"<html>\n"
"<head>\n"
" <title>Login successful, you can close the tab</title>\n"
"</head>\n"
"<body>\n"
" <H1>Login successful</H1>\n"
" <p>You can close this tab now</p>\n"
"</body>\n"
"</html>"
Inheritance diagram for BrowserAuthenticationConfig:
tenduke::oidc::BaseOIDCAuthenticationConfig

Public Member Functions

 BrowserAuthenticationConfig (std::string oauthClientId, std::string oauthRedirectUri, std::string httpResponseAfterSuccessfulLogin, ::tenduke::oidc::OIDCSessionConfiguration oidcSessionConfiguration={}, std::string scopes={})
 Constructs a new instance.
 
- Public Member Functions inherited from tenduke::oidc::BaseOIDCAuthenticationConfig
 BaseOIDCAuthenticationConfig (std::string oauthClientId, std::string oauthClientSecret={}, ::tenduke::oidc::OIDCSessionConfiguration oidcSessionConfiguration={}, std::string scopes={})
 

Public Attributes

const std::string oauthRedirectURI
 OAuth redirect-URI.
 
const std::string httpResponseAfterSuccessfulLogin
 HTTP-response which is served after successful login.
 
- Public Attributes inherited from tenduke::oidc::BaseOIDCAuthenticationConfig
const std::string oauthClientId
 OAuth client id.
 
const std::string oauthClientSecret
 OAuth client secret.
 
const ::tenduke::oidc::OIDCSessionConfiguration oidcSessionConfiguration
 OIDC session configuration.
 
const std::string scopes
 OAuth/OIDC scopes to authorize.
 

Constructor & Destructor Documentation

◆ BrowserAuthenticationConfig()

tenduke::oidc::osbrowser::BrowserAuthenticationConfig::BrowserAuthenticationConfig ( std::string oauthClientId,
std::string oauthRedirectUri,
std::string httpResponseAfterSuccessfulLogin,
::tenduke::oidc::OIDCSessionConfiguration oidcSessionConfiguration = {},
std::string scopes = {} )
inline

Constructs a new instance.

Parameters
oauthClientIdOAuth client id. The value configured in the OAuth/OIDC backend and must match this parameter.
oauthRedirectUriOAuth redirect-URI. The value is configured in the OAuth/OIDC backend and must match this parameter. IMPORTANT NOTE: This must start with http://localhost. Example http://localhost/oidc/login.
httpResponseAfterSuccessfulLoginHTTP-response which is served after successful login. IMPORTANT NOTE: This is a full HTTP response, including the status line, headers and the response message body. Rationale: This way you also do HTTP redirects.
oidcSessionConfigurationConfiguration of the OIDCSession-service. Optional.
scopesOAuth scopes to authorize.

Member Data Documentation

◆ httpResponseAfterSuccessfulLogin

const std::string tenduke::oidc::osbrowser::BrowserAuthenticationConfig::httpResponseAfterSuccessfulLogin

HTTP-response which is served after successful login.

IMPORTANT NOTE: This is the full HTTP response, including the status line, headers and the response message body. Rationale: This way you also do HTTP redirects.

◆ oauthRedirectURI

const std::string tenduke::oidc::osbrowser::BrowserAuthenticationConfig::oauthRedirectURI

OAuth redirect-URI.

The value is configured in the OAuth/OIDC backend and must match this parameter. IMPORTANT NOTE: This must start with http://localhost. Example http://localhost/oidc/login.


The documentation for this class was generated from the following file: