forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in CST-10703 (pull request DSpace#911)
CST-10703 Approved-by: Giuseppe Digilio
- Loading branch information
Showing
86 changed files
with
3,199 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ export enum AuthMethodType { | |
Ip = 'ip', | ||
X509 = 'x509', | ||
Oidc = 'oidc', | ||
Orcid = 'orcid' | ||
Orcid = 'orcid', | ||
} |
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,4 @@ | ||
export enum AuthRegistrationType { | ||
Orcid = 'ORCID', | ||
Validation = 'VALIDATION_', | ||
} |
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
29 changes: 29 additions & 0 deletions
29
src/app/external-log-in/decorators/external-log-in.methods-decorator.ts
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,29 @@ | ||
import { AuthRegistrationType } from '../../core/auth/models/auth.registration-type'; | ||
|
||
/** | ||
* Map to store the external login confirmation component for the given auth method type | ||
*/ | ||
const authMethodsMap = new Map(); | ||
/** | ||
* Decorator to register the external login confirmation component for the given auth method type | ||
* @param authMethodType the type of the external login method | ||
*/ | ||
export function renderExternalLoginConfirmationFor( | ||
authMethodType: AuthRegistrationType | ||
) { | ||
return function decorator(objectElement: any) { | ||
if (!objectElement) { | ||
return; | ||
} | ||
authMethodsMap.set(authMethodType, objectElement); | ||
}; | ||
} | ||
/** | ||
* Get the external login confirmation component for the given auth method type | ||
* @param authMethodType the type of the external login method | ||
*/ | ||
export function getExternalLoginConfirmationType( | ||
authMethodType: AuthRegistrationType | ||
) { | ||
return authMethodsMap.get(authMethodType); | ||
} |
22 changes: 22 additions & 0 deletions
22
src/app/external-log-in/decorators/external-login-method-entry.component.ts
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,22 @@ | ||
import { Component, Inject } from '@angular/core'; | ||
import { Registration } from '../../core/shared/registration.model'; | ||
|
||
/** | ||
* This component renders a form to complete the registration process | ||
*/ | ||
@Component({ | ||
template: '' | ||
}) | ||
export abstract class ExternalLoginMethodEntryComponent { | ||
|
||
/** | ||
* The registration data object | ||
*/ | ||
public registratioData: Registration; | ||
|
||
constructor( | ||
@Inject('registrationDataProvider') protected injectedRegistrationDataObject: Registration, | ||
) { | ||
this.registratioData = injectedRegistrationDataObject; | ||
} | ||
} |
Oops, something went wrong.