Skip to content

Commit

Permalink
Add support for SAML authentication.
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-lee committed Nov 1, 2024
1 parent 4fd3df4 commit 449c092
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/core/auth/models/auth.method-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export enum AuthMethodType {
Ip = 'ip',
X509 = 'x509',
Oidc = 'oidc',
Orcid = 'orcid'
Orcid = 'orcid',
Saml = 'saml'
}
5 changes: 5 additions & 0 deletions src/app/core/auth/models/auth.method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export class AuthMethod {
this.location = location;
break;
}
case 'saml': {
this.authMethodType = AuthMethodType.Saml;
this.location = location;
break;

Check warning on line 46 in src/app/core/auth/models/auth.method.ts

View check run for this annotation

Codecov / codecov/patch

src/app/core/auth/models/auth.method.ts#L44-L46

Added lines #L44 - L46 were not covered by tests
}

default: {
break;
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/log-in/methods/log-in.methods-decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const AUTH_METHOD_FOR_DECORATOR_MAP = new Map<AuthMethodType, AuthMethodT
[AuthMethodType.Shibboleth, LogInExternalProviderComponent],
[AuthMethodType.Oidc, LogInExternalProviderComponent],
[AuthMethodType.Orcid, LogInExternalProviderComponent],
[AuthMethodType.Saml, LogInExternalProviderComponent],
]);

/**
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3188,6 +3188,8 @@

"login.form.password": "Password",

"login.form.saml": "Log in with SAML",

"login.form.shibboleth": "Log in with Shibboleth",

"login.form.submit": "Log in",
Expand Down

0 comments on commit 449c092

Please sign in to comment.