5namespace Stroika::Frameworks::Auth::OAuth {
12 inline const ObjectVariantMapper ProviderConfiguration::kMapper = [] () {
13 ObjectVariantMapper mapper;
14 mapper.AddCommonType<URI> ();
15 mapper.AddCommonType<optional<URI>> ();
16 mapper.AddClass<ProviderConfiguration> ({
33 inline const ObjectVariantMapper ClientConfiguration::kMapper = [] () {
34 ObjectVariantMapper mapper;
35 mapper.AddCommonType<optional<String>> ();
37 mapper.AddCommonType<Sequence<RedirectURLType>> ();
38 mapper.AddCommonType<Set<String>> ();
39 mapper.AddClass<ClientConfiguration> ({
40 {
"provider"sv, &ClientConfiguration::fProvider},
56 .openid_configuration_uri =
"https://accounts.google.com/"sv,
57 .auth_uri =
"https://accounts.google.com/o/oauth2/auth"sv,
58 .token_uri =
"https://oauth2.googleapis.com/token"sv,
59 .userinfo_endpoint =
"https://openidconnect.googleapis.com/v1/userinfo"sv,
60 .revocation_endpoint =
"https://oauth2.googleapis.com/revoke"sv,
61 .auth_provider_x509_cert_url =
"https://www.googleapis.com/oauth2/v1/certs"sv},
63 .openid_configuration_uri =
"https://login.microsoftonline.com/common/v2.0/"sv,
64 .auth_uri =
"https://login.microsoftonline.com/common/oauth2/v2.0/authorize"sv,
65 .token_uri =
"https://login.microsoftonline.com/common/oauth2/v2.0/token"sv,
66 .userinfo_endpoint =
"https://graph.microsoft.com/oidc/userinfo"sv,
67 .auth_provider_x509_cert_url =
"https://login.microsoftonline.com/common/discovery/v2.0/keys"sv},
69 .openid_configuration_uri =
"https://account.apple.com/"sv,
70 .auth_uri =
"https://appleid.apple.com/auth/authorize"sv,
71 .token_uri =
"https://appleid.apple.com/auth/token"sv,
72 .auth_provider_x509_cert_url =
"https://appleid.apple.com/auth/keys"sv},
74 .openid_configuration_uri =
"https://www.facebook.com/"sv,
75 .auth_uri =
"https://facebook.com/dialog/oauth/"sv,
76 .auth_provider_x509_cert_url =
"https://www.facebook.com/.well-known/oauth/openid/jwks/"sv},
77 ProviderConfiguration{.
name =
"twitter"sv, .auth_uri =
"https://api.twitter.com/oauth/authorize"sv, .token_uri =
"https://api.twitter.com/oauth/request_token"sv},
const ProvidersConfigurations kDefaultProviderConfigurations
a cross between Mapping<KEY, T> and Collection<T> and Set<T>
Track configuration data about stuff that differentiates different OAuth providers - what URLs to use...
optional< URI > token_uri
optional< URI > revocation_endpoint
optional< URI > auth_provider_x509_cert_url
optional< URI > openid_configuration_uri
optional< URI > userinfo_endpoint
optional< String > fClientSecret
Sequence< RedirectURLType > fRedirectURLs
ApplicationIDType fApplicationID