-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auth-handler): Enable primary domain filtering
This enables filtering on primary domains (google calls this `hd` or `hosted domain`). When this field is set, any JWT or opaque token must be requested with the corresponding domain to be valid for auth.
- Loading branch information
Christoph Bühler
committed
Dec 7, 2020
1 parent
35273a1
commit cfd2e4c
Showing
49 changed files
with
651 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
tests/Zitadel.Spa.Dev/wwwroot/hd-bearer/asset-manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"files": { | ||
"main.css": "/hd-bearer/static/css/main.d3aef3ac.chunk.css", | ||
"main.js": "/hd-bearer/static/js/main.1f84db4e.chunk.js", | ||
"main.js.map": "/hd-bearer/static/js/main.1f84db4e.chunk.js.map", | ||
"runtime-main.js": "/hd-bearer/static/js/runtime-main.db7932c4.js", | ||
"runtime-main.js.map": "/hd-bearer/static/js/runtime-main.db7932c4.js.map", | ||
"static/css/2.37865b2a.chunk.css": "/hd-bearer/static/css/2.37865b2a.chunk.css", | ||
"static/js/2.8ab5b71a.chunk.js": "/hd-bearer/static/js/2.8ab5b71a.chunk.js", | ||
"static/js/2.8ab5b71a.chunk.js.map": "/hd-bearer/static/js/2.8ab5b71a.chunk.js.map", | ||
"index.html": "/hd-bearer/index.html", | ||
"precache-manifest.36bd386d44cf58b390009591b12a6f76.js": "/hd-bearer/precache-manifest.36bd386d44cf58b390009591b12a6f76.js", | ||
"service-worker.js": "/hd-bearer/service-worker.js", | ||
"static/css/2.37865b2a.chunk.css.map": "/hd-bearer/static/css/2.37865b2a.chunk.css.map", | ||
"static/css/main.d3aef3ac.chunk.css.map": "/hd-bearer/static/css/main.d3aef3ac.chunk.css.map", | ||
"static/js/2.8ab5b71a.chunk.js.LICENSE.txt": "/hd-bearer/static/js/2.8ab5b71a.chunk.js.LICENSE.txt", | ||
"static/media/logo.svg": "/hd-bearer/static/media/logo.5d5d9eef.svg" | ||
}, | ||
"entrypoints": [ | ||
"static/js/runtime-main.db7932c4.js", | ||
"static/css/2.37865b2a.chunk.css", | ||
"static/js/2.8ab5b71a.chunk.js", | ||
"static/css/main.d3aef3ac.chunk.css", | ||
"static/js/main.1f84db4e.chunk.js" | ||
] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><base href="/hd-bearer/"/><title>React App</title><link href="/hd-bearer/static/css/2.37865b2a.chunk.css" rel="stylesheet"><link href="/hd-bearer/static/css/main.d3aef3ac.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,l=r[0],c=r[1],a=r[2],p=0,s=[];p<l.length;p++)i=l[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var c=t[l];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/hd-bearer/";var l=this["webpackJsonpreact-oidc-client-js"]=this["webpackJsonpreact-oidc-client-js"]||[],c=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var f=c;t()}([])</script><script src="/hd-bearer/static/js/2.8ab5b71a.chunk.js"></script><script src="/hd-bearer/static/js/main.1f84db4e.chunk.js"></script></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"short_name": "React App", | ||
"name": "Create React App Sample", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico", | ||
"sizes": "64x64 32x32 24x24 16x16", | ||
"type": "image/x-icon" | ||
} | ||
], | ||
"start_url": "./index.html", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
47 changes: 47 additions & 0 deletions
47
tests/Zitadel.Spa.Dev/wwwroot/hd-bearer/oidc-client.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
...s/Zitadel.Spa.Dev/wwwroot/hd-bearer/precache-manifest.36bd386d44cf58b390009591b12a6f76.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
self.__precacheManifest = (self.__precacheManifest || []).concat([ | ||
{ | ||
"revision": "ea65d2f7b51efe15d5e29e9dc900e1b9", | ||
"url": "/hd-bearer/index.html" | ||
}, | ||
{ | ||
"revision": "a78d3d37911f04469b2e", | ||
"url": "/hd-bearer/static/css/2.37865b2a.chunk.css" | ||
}, | ||
{ | ||
"revision": "2d8207e7c2be01287257", | ||
"url": "/hd-bearer/static/css/main.d3aef3ac.chunk.css" | ||
}, | ||
{ | ||
"revision": "a78d3d37911f04469b2e", | ||
"url": "/hd-bearer/static/js/2.8ab5b71a.chunk.js" | ||
}, | ||
{ | ||
"revision": "02af0e61c1ccac6e25bebd46b247a2e4", | ||
"url": "/hd-bearer/static/js/2.8ab5b71a.chunk.js.LICENSE.txt" | ||
}, | ||
{ | ||
"revision": "2d8207e7c2be01287257", | ||
"url": "/hd-bearer/static/js/main.1f84db4e.chunk.js" | ||
}, | ||
{ | ||
"revision": "e26a293f273dac16b3a3", | ||
"url": "/hd-bearer/static/js/runtime-main.db7932c4.js" | ||
}, | ||
{ | ||
"revision": "5d5d9eefa31e5e13a6610d9fa7a283bb", | ||
"url": "/hd-bearer/static/media/logo.5d5d9eef.svg" | ||
} | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Welcome to your Workbox-powered service worker! | ||
* | ||
* You'll need to register this file in your web app and you should | ||
* disable HTTP caching for this file too. | ||
* See https://goo.gl/nhQhGp | ||
* | ||
* The rest of the code is auto-generated. Please don't update this file | ||
* directly; instead, make changes to your Workbox build configuration | ||
* and re-run your build process. | ||
* See https://goo.gl/2aRDsh | ||
*/ | ||
|
||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); | ||
|
||
importScripts( | ||
"/hd-bearer/precache-manifest.36bd386d44cf58b390009591b12a6f76.js" | ||
); | ||
|
||
self.addEventListener('message', (event) => { | ||
if (event.data && event.data.type === 'SKIP_WAITING') { | ||
self.skipWaiting(); | ||
} | ||
}); | ||
|
||
workbox.core.clientsClaim(); | ||
|
||
/** | ||
* The workboxSW.precacheAndRoute() method efficiently caches and responds to | ||
* requests for URLs in the manifest. | ||
* See https://goo.gl/S9QRab | ||
*/ | ||
self.__precacheManifest = [].concat(self.__precacheManifest || []); | ||
workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); | ||
|
||
workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/hd-bearer/index.html"), { | ||
|
||
blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/], | ||
}); |
26 changes: 26 additions & 0 deletions
26
tests/Zitadel.Spa.Dev/wwwroot/hd-bearer/signin-callback.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<title>Authentification callback processing..</title> | ||
</head> | ||
|
||
<body> | ||
<noscript> | ||
You need to enable JavaScript to run this app. | ||
</noscript> | ||
|
||
<h1>Authentification callback processing...</h1> | ||
|
||
<script src="oidc-client.min.js"></script> | ||
<script> | ||
new Oidc.UserManager({ response_mode: "query" }).signinRedirectCallback().then(function () { | ||
window.location = "index.html"; | ||
}).catch(function (e) { | ||
console.error(e); | ||
}); | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script src="oidc-client.min.js"></script> | ||
<script> | ||
var mgr = new Oidc.UserManager(); | ||
mgr.signinSilentCallback().catch(function (error) { | ||
console.error(error); | ||
}); | ||
</script> |
7 changes: 7 additions & 0 deletions
7
tests/Zitadel.Spa.Dev/wwwroot/hd-bearer/static/css/2.37865b2a.chunk.css
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
tests/Zitadel.Spa.Dev/wwwroot/hd-bearer/static/css/2.37865b2a.chunk.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
tests/Zitadel.Spa.Dev/wwwroot/hd-bearer/static/css/main.d3aef3ac.chunk.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
tests/Zitadel.Spa.Dev/wwwroot/hd-bearer/static/css/main.d3aef3ac.chunk.css.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/Zitadel.Spa.Dev/wwwroot/hd-bearer/static/js/2.8ab5b71a.chunk.js
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.