10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::oidc::osbrowser::BrowserAuthenticationConfig Class Reference

#include <BrowserAuthenticationConfig.h>

Detailed Description

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

NOTE: The "default-osbowser" -authentication requires a HTTP-response, which is served after successful login. This response is configured with 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 pages 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>"

Public Member Functions

 BrowserAuthenticationConfig (std::string oauthClientId, std::string oauthRedirectUri, std::string httpResponseAfterSuccessfulLogin, const ::tenduke::oidc::OIDCSessionConfiguration &oidcSessionConfiguration={})
 Constructs new instance.
 

Public Attributes

const std::string oauthClientId
 OAuth client id.
 
const ::tenduke::oidc::OIDCSessionConfiguration oidcSessionConfiguration
 Configuration of the OIDCSession-service.
 
const std::string oauthRedirectURI
 OAuth redirect-URI.
 
const std::string httpResponseAfterSuccessfulLogin
 HTTP-response which is served after successful login.
 

Constructor & Destructor Documentation

◆ BrowserAuthenticationConfig()

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

Constructs new instance.

Parameters
oauthClientIdOAuth client id. The value configured in the OAuth/OIDC backend and must match this parameter.
oauthRedirectUriOAuth redirect-URI. The value 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 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.

Member Data Documentation

◆ httpResponseAfterSuccessfulLogin

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

HTTP-response which is served after successful login.

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

◆ oauthClientId

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

OAuth client id.

The value configured in the OAuth/OIDC backend and must match this parameter.

◆ oauthRedirectURI

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

OAuth redirect-URI.

The value 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: