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> ({
35 inline const ObjectVariantMapper ClientConfiguration::kMapper = [] () {
36 ObjectVariantMapper mapper;
37 mapper.AddCommonType<optional<String>> ();
39 mapper.AddCommonType<Sequence<RedirectURLType>> ();
40 mapper.AddCommonType<Set<String>> ();
41 mapper.AddClass<ClientConfiguration> ({
42 {
"provider"sv, &ClientConfiguration::fProvider},
58 .openid_configuration_uri =
"https://accounts.google.com/"sv,
59 .auth_uri =
"https://accounts.google.com/o/oauth2/auth"sv,
60 .token_uri =
"https://oauth2.googleapis.com/token"sv,
61 .userinfo_endpoint =
"https://openidconnect.googleapis.com/v1/userinfo"sv,
62 .revocation_endpoint =
"https://oauth2.googleapis.com/revoke"sv,
63 .auth_provider_x509_cert_url =
"https://www.googleapis.com/oauth2/v1/certs"sv,
64 .tokeninfo_endpoint =
"https://oauth2.googleapis.com/tokeninfo"sv},
66 .openid_configuration_uri =
"https://login.microsoftonline.com/common/v2.0/"sv,
67 .auth_uri =
"https://login.microsoftonline.com/common/oauth2/v2.0/authorize"sv,
68 .token_uri =
"https://login.microsoftonline.com/common/oauth2/v2.0/token"sv,
69 .userinfo_endpoint =
"https://graph.microsoft.com/oidc/userinfo"sv,
70 .auth_provider_x509_cert_url =
"https://login.microsoftonline.com/common/discovery/v2.0/keys"sv},
72 .openid_configuration_uri =
"https://account.apple.com/"sv,
73 .auth_uri =
"https://appleid.apple.com/auth/authorize"sv,
74 .token_uri =
"https://appleid.apple.com/auth/token"sv,
75 .auth_provider_x509_cert_url =
"https://appleid.apple.com/auth/keys"sv},
77 .openid_configuration_uri =
"https://www.facebook.com/"sv,
78 .auth_uri =
"https://facebook.com/dialog/oauth/"sv,
79 .auth_provider_x509_cert_url =
"https://www.facebook.com/.well-known/oauth/openid/jwks/"sv},
80 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 > tokeninfo_endpoint
logically similar to introspection_endpoint, but googles incompatible way
optional< URI > revocation_endpoint
optional< URI > introspection_endpoint
RFC 7662 compatible API for finding info about a token - https://datatracker.ietf....
optional< URI > auth_provider_x509_cert_url
optional< URI > openid_configuration_uri
optional< URI > userinfo_endpoint
optional< String > fClientSecret
Sequence< RedirectURLType > fRedirectURLs
ApplicationIDType fApplicationID