diff options
| author | mo khan <mo@mokhan.ca> | 2025-02-27 16:25:09 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-02-27 16:25:09 -0700 |
| commit | ce517821f2f9d44877f288adaf10b43cefd65d1b (patch) | |
| tree | f8c77c275f9f7d3f55e501c758679afcd1aa79d4 /bin/idp | |
| parent | dea9650edcd3f4e673712339f3000fcab7393ec1 (diff) | |
Stub out endpoints for OIDC/OAuth metadata endpoints
Diffstat (limited to 'bin/idp')
| -rwxr-xr-x | bin/idp | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -70,11 +70,26 @@ class IdentityProvider [200, { 'Content-Type' => "application/samlmetadata+xml" }, [xml]] end + # GET /.well-known/oauth-authorization-server + def oauth_metadata + [200, { 'Content-Type' => "application/json" }, ["{}"]] + end + + # GET /.well-known/openid-configuration + def openid_metadata + [200, { 'Content-Type' => "application/json" }, ["{}"]] + end + + # auth service def call(env) path = env['PATH_INFO'] case env['REQUEST_METHOD'] when 'GET' case path + when '/.well-known/openid-configuration' + return openid_metadata + when '/.well-known/oauth-authorization-server' + return oauth_metadata when "/metadata.xml" return metadata when "/sessions/new" @@ -131,7 +146,6 @@ class IdentityProvider [200, { 'Content-Type' => "text/html" }, [html]] end - def not_found [404, {}, []] end |
