oauthex: move internal/oauthex to oauthex (#559)

This PR relocates oauthex and moves DCR logic into dcr.go.

Fixes #558
This commit is contained in:
Sam Thanawalla 2025-10-07 08:39:49 -04:00 • committed by GitHub
commit 9348d33b75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 272 additions and 239 deletions

View file

@ -0,0 +1,8 @@
{
"client_name": "My Test App",
"redirect_uris": [
"https://client.example.org/callback",
"https://client.example.org/callback2"
],
"scope": "read write"
}

57
oauthex/testdata/google-auth-meta.json vendored Normal file
View file

@ -0,0 +1,57 @@
{
"issuer": "https://accounts.google.com",
"authorization_endpoint": "https://accounts.google.com/o/oauth2/v2/auth",
"device_authorization_endpoint": "https://oauth2.googleapis.com/device/code",
"token_endpoint": "https://oauth2.googleapis.com/token",
"userinfo_endpoint": "https://openidconnect.googleapis.com/v1/userinfo",
"revocation_endpoint": "https://oauth2.googleapis.com/revoke",
"jwks_uri": "https://www.googleapis.com/oauth2/v3/certs",
"response_types_supported": [
"code",
"token",
"id_token",
"code token",
"code id_token",
"token id_token",
"code token id_token",
"none"
],
"subject_types_supported": [
"public"
],
"id_token_signing_alg_values_supported": [
"RS256"
],
"scopes_supported": [
"openid",
"email",
"profile"
],
"token_endpoint_auth_methods_supported": [
"client_secret_post",
"client_secret_basic"
],
"claims_supported": [
"aud",
"email",
"email_verified",
"exp",
"family_name",
"given_name",
"iat",
"iss",
"name",
"picture",
"sub"
],
"code_challenge_methods_supported": [
"plain",
"S256"
],
"grant_types_supported": [
"authorization_code",
"refresh_token",
"urn:ietf:params:oauth:grant-type:device_code",
"urn:ietf:params:oauth:grant-type:jwt-bearer"
]
}