Skip to content

Commit

Permalink
multi auth
Browse files Browse the repository at this point in the history
Signed-off-by: Sam <[email protected]>
  • Loading branch information
samuelcostae committed Sep 11, 2023
1 parent 39a5c8e commit 304289a
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion server/auth/types/multiple/multi_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ import { ANONYMOUS_AUTH_LOGIN, AuthType, LOGIN_PAGE_URI } from '../../../../comm
import { composeNextUrlQueryParam } from '../../../utils/next_url';
import { MultiAuthRoutes } from './routes';
import { SecuritySessionCookie } from '../../../session/security_cookie';
import { BasicAuthentication, OpenIdAuthentication, SamlAuthentication } from '../../types';
import {
BasicAuthentication,
OpenIdAuthentication,
SamlAuthentication,
KerberosAuthentication,
} from '../../types';

export class MultipleAuthentication extends AuthenticationType {
private authTypes: string | string[];
Expand Down Expand Up @@ -93,6 +98,19 @@ export class MultipleAuthentication extends AuthenticationType {
this.authHandlers.set(AuthType.SAML, SamlAuth);
break;
}
case AuthType.KERBEROS: {
const KerberosAuth = new KerberosAuthentication(
this.config,
this.sessionStorageFactory,
this.router,
this.esClient,
this.coreSetup,
this.logger
);
await KerberosAuth.init();
this.authHandlers.set(AuthType.KERBEROS, KerberosAuth);
break;
}
default: {
throw new Error(`Unsupported authentication type: ${this.authTypes[i]}`);
}
Expand Down

0 comments on commit 304289a

Please sign in to comment.