Skip to content

Commit

Permalink
N21-2136 moin schule logout from svs (#5317)
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonNicholasCap authored and hoeppner-dataport committed Nov 18, 2024
1 parent e0f82f9 commit 2f185b4
Show file tree
Hide file tree
Showing 45 changed files with 1,537 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ data:
"authEndpoint": "https://auth.stage.niedersachsen-login.schule/realms/SANIS/protocol/openid-connect/auth",
"provider": "sanis",
"jwksEndpoint": "https://auth.stage.niedersachsen-login.schule/realms/SANIS/protocol/openid-connect/certs",
"issuer": "https://auth.stage.niedersachsen-login.schule/realms/SANIS"
"issuer": "https://auth.stage.niedersachsen-login.schule/realms/SANIS",
"endSessionEndpoint": "https://auth.stage.niedersachsen-login.schule/realms/SANIS/protocol/openid-connect/logout",
}
}
);'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Module } from '@nestjs/common';
import { SystemModule } from '@modules/system';
import { OauthModule } from '@modules/oauth';
import { AuthenticationTestModule } from './authentication-test.module';
import { LoginController, LogoutController } from './controllers';
import { LoginUc, LogoutUc } from './uc';

// This module is for use in api tests of other apps than the core server.
@Module({
imports: [AuthenticationTestModule],
imports: [AuthenticationTestModule, SystemModule, OauthModule],
providers: [LoginUc, LogoutUc],
controllers: [LoginController, LogoutController],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Module } from '@nestjs/common';
import { SystemModule } from '@modules/system';
import { OauthModule } from '@modules/oauth/oauth.module';
import { AuthenticationModule } from './authentication.module';
import { LoginController, LogoutController } from './controllers';
import { LoginUc, LogoutUc } from './uc';

@Module({
imports: [AuthenticationModule],
imports: [AuthenticationModule, SystemModule, OauthModule],
providers: [LoginUc, LogoutUc],
controllers: [LoginController, LogoutController],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export interface AuthenticationConfig extends AccountConfig {
JWT_EXTENDED_TIMEOUT_SECONDS: number;
SC_DOMAIN: string;
LOGIN_BLOCK_TIME: number;
FEATURE_EXTERNAL_SYSTEM_LOGOUT_ENABLED: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib';
import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard';
import { CacheWrapperModule } from '@infra/cache';
import { IdentityManagementModule } from '@infra/identity-management';
import { EncryptionModule } from '@infra/encryption';
import { AccountModule } from '@modules/account';
import { OauthModule } from '@modules/oauth/oauth.module';
import { RoleModule } from '@modules/role';
import { SystemModule } from '@modules/system';
import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { HttpModule } from '@nestjs/axios';
import { LegacySchoolRepo, UserRepo } from '@shared/repo';
import { LoggerModule } from '@src/core/logger';
import { Algorithm, SignOptions } from 'jsonwebtoken';
Expand Down Expand Up @@ -59,6 +61,8 @@ const createJwtOptions = () => {
IdentityManagementModule,
CacheWrapperModule,
AuthGuardModule.register([AuthGuardOptions.JWT]),
HttpModule,
EncryptionModule,
],
providers: [
UserRepo,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { CacheWrapperModule } from '@infra/cache';
import { EncryptionModule } from '@infra/encryption';
import { IdentityManagementModule } from '@infra/identity-management';
import { AccountModule } from '@modules/account';
import { OauthModule } from '@modules/oauth/oauth.module';
import { RoleModule } from '@modules/role';
import { SystemModule } from '@modules/system';
import { Module } from '@nestjs/common';
import { HttpModule } from '@nestjs/axios';
import { ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
Expand Down Expand Up @@ -57,6 +59,8 @@ const createJwtOptions = (configService: ConfigService<AuthenticationConfig>) =>
RoleModule,
IdentityManagementModule,
CacheWrapperModule,
HttpModule,
EncryptionModule,
],
providers: [
UserRepo,
Expand Down
Loading

0 comments on commit 2f185b4

Please sign in to comment.