Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Configuration.h File Reference
#include "Stroika/Frameworks/StroikaPreComp.h"
#include "Stroika/Foundation/Characters/String.h"
#include "Stroika/Foundation/Common/Common.h"
#include "Stroika/Foundation/Common/GUID.h"
#include "Stroika/Foundation/Containers/KeyedCollection.h"
#include "Stroika/Foundation/Containers/Sequence.h"
#include "Stroika/Foundation/DataExchange/ObjectVariantMapper.h"
#include "Stroika/Foundation/IO/Network/URI.h"
#include "Configuration.inl"

Go to the source code of this file.

Classes

class  Stroika::Frameworks::Auth::OAuth::ProviderConfiguration
 Track configuration data about stuff that differentiates different OAuth providers - what URLs to use, base url, relative off that URLs for login/upgrade token/refresh etc. ALL very prelim at this stage. More...
 
struct  Stroika::Frameworks::Auth::OAuth::ClientConfiguration
 

Typedefs

using Stroika::Frameworks::Auth::OAuth::ApplicationIDType = String
 sometimes called ClientID, and sometimes called applicationID
 
using Stroika::Frameworks::Auth::OAuth::RedirectURLType = URI
 
using Stroika::Frameworks::Auth::OAuth::ProvidersConfigurations = KeyedCollection< ProviderConfiguration, String, Private_::My_Traits_ >
 
using Stroika::Frameworks::Auth::OAuth::ClientConfigurations = Sequence< ClientConfiguration >
 

Variables

const ProvidersConfigurations Stroika::Frameworks::Auth::OAuth::kDefaultProviderConfigurations
 

Detailed Description

Note
Code-Status: Alpha

Definition in file Configuration.h.

Typedef Documentation

◆ ApplicationIDType

sometimes called ClientID, and sometimes called applicationID

Documentation about these concepts: google - https://developers.google.com/identity/protocols/oauth2/web-server#httprest

Note
though this is often a GUID, it cannot be assumed to be a GUID (google for example, doesn't use GUIDs).

Definition at line 53 of file Configuration.h.

◆ RedirectURLType

often require things like no #/fragments

Definition at line 58 of file Configuration.h.

◆ ProvidersConfigurations

using Stroika::Frameworks::Auth::OAuth::ProvidersConfigurations = typedef KeyedCollection<ProviderConfiguration, String, Private_::My_Traits_>

A list of definitions for configurations.

Definition at line 168 of file Configuration.h.

◆ ClientConfigurations

using Stroika::Frameworks::Auth::OAuth::ClientConfigurations = typedef Sequence<ClientConfiguration>
Example Usage
{
{ .fProvider = "google", .fApplicationID = "003...", .fRedirectURLs = ["http://localhost"], .fScopes = ["openid"] },
{ .fProvider = "apple", .fApplicationID = "003...", .fRedirectURLs = ["http://localhost"], .fScopes = ["openid"] },
{ .fProvider = "twitter", .fApplicationID = "003...", .fRedirectURLs = ["http://localhost"], .fScopes = ["openid"] },
{ .fProvider = "facebook", .fApplicationID = "003...", .fRedirectURLs = ["http://localhost"], .fScopes = ["openid"] },
}

Definition at line 229 of file Configuration.h.

Variable Documentation

◆ kDefaultProviderConfigurations

const ProvidersConfigurations Stroika::Frameworks::Auth::OAuth::kDefaultProviderConfigurations
Initial value:
{
ProviderConfiguration{.name = "google"sv,
.openid_configuration_uri = "https://accounts.google.com/"sv,
.auth_uri = "https://accounts.google.com/o/oauth2/auth"sv,
.token_uri = "https://oauth2.googleapis.com/token"sv,
.userinfo_endpoint = "https://openidconnect.googleapis.com/v1/userinfo"sv,
.revocation_endpoint = "https://oauth2.googleapis.com/revoke"sv,
.auth_provider_x509_cert_url = "https://www.googleapis.com/oauth2/v1/certs"sv},
ProviderConfiguration{.name = "microsoft"sv,
.openid_configuration_uri = "https://login.microsoftonline.com/common/v2.0/"sv,
.auth_uri = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"sv,
.token_uri = "https://login.microsoftonline.com/common/oauth2/v2.0/token"sv,
.userinfo_endpoint = "https://graph.microsoft.com/oidc/userinfo"sv,
.auth_provider_x509_cert_url = "https://login.microsoftonline.com/common/discovery/v2.0/keys"sv},
ProviderConfiguration{.name = "apple"sv,
.openid_configuration_uri = "https://account.apple.com/"sv,
.auth_uri = "https://appleid.apple.com/auth/authorize"sv,
.token_uri = "https://appleid.apple.com/auth/token"sv,
.auth_provider_x509_cert_url = "https://appleid.apple.com/auth/keys"sv},
ProviderConfiguration{.name = "facebook"sv,
.openid_configuration_uri = "https://www.facebook.com/"sv,
.auth_uri = "https://facebook.com/dialog/oauth/"sv,
.auth_provider_x509_cert_url = "https://www.facebook.com/.well-known/oauth/openid/jwks/"sv},
ProviderConfiguration{.name = "twitter"sv, .auth_uri = "https://api.twitter.com/oauth/authorize"sv, .token_uri = "https://api.twitter.com/oauth/request_token"sv},
}
Track configuration data about stuff that differentiates different OAuth providers - what URLs to use...

a predefined set of configurations, but you may need to update/roll your own, as this could get out of date.

Definition at line 54 of file Configuration.inl.