Error response enhancements, CoreID auth client backend

This commit is contained in:
2022-03-29 01:14:46 -05:00
parent a039b1ff25
commit 8f08b94f74
31 changed files with 736 additions and 52 deletions

View File

@@ -26,8 +26,8 @@ export class AuthRequiredMiddleware extends Middleware {
if ( !this.security.hasUser() ) {
this.session.set('@extollo:auth.intention', this.request.url)
if ( this.routing.hasNamedRoute('@auth.login') ) {
return redirect(this.routing.getNamedPath('@auth.login').toRemote)
if ( this.routing.hasNamedRoute('@auth:login') ) {
return redirect(this.routing.getNamedPath('@auth:login').toRemote)
} else {
return error(new NotAuthorizedError(), HTTPStatus.FORBIDDEN)
}