diff --git a/src/app/core/auth/auth.actions.ts b/src/app/core/auth/auth.actions.ts index d0969d38d4..f54ceea686 100644 --- a/src/app/core/auth/auth.actions.ts +++ b/src/app/core/auth/auth.actions.ts @@ -17,6 +17,9 @@ export const AuthActionTypes = { AUTHENTICATED_SUCCESS: type('dspace/auth/AUTHENTICATED_SUCCESS'), CHECK_AUTHENTICATION_TOKEN: type('dspace/auth/CHECK_AUTHENTICATION_TOKEN'), CHECK_AUTHENTICATION_TOKEN_ERROR: type('dspace/auth/CHECK_AUTHENTICATION_TOKEN_ERROR'), + RETRIEVE_AUTH_METHODS: type('dspace/auth/RETRIEVE_AUTH_METHODS'), + RETRIEVE_AUTH_METHODS_SUCCESS: type('dspace/auth/RETRIEVE_AUTH_METHODS_SUCCESS'), + RETRIEVE_AUTH_METHODS_ERROR: type('dspace/auth/RETRIEVE_AUTH_METHODS_ERROR'), REDIRECT_TOKEN_EXPIRED: type('dspace/auth/REDIRECT_TOKEN_EXPIRED'), REDIRECT_AUTHENTICATION_REQUIRED: type('dspace/auth/REDIRECT_AUTHENTICATION_REQUIRED'), REFRESH_TOKEN: type('dspace/auth/REFRESH_TOKEN'), @@ -308,6 +311,38 @@ export class ResetAuthenticationMessagesAction implements Action { public type: string = AuthActionTypes.RESET_MESSAGES; } +/** + * Check if token is already present upon initial load. + * @class CheckAuthenticationTokenAction + * @implements {Action} + */ +export class RetrieveAuthMethodsAction implements Action { + public type: string = AuthActionTypes.RETRIEVE_AUTH_METHODS; +} + +/** + * Check if token is already present upon initial load. + * @class CheckAuthenticationTokenAction + * @implements {Action} + */ +export class RetrieveAuthMethodsSuccessAction implements Action { + public type: string = AuthActionTypes.RETRIEVE_AUTH_METHODS_SUCCESS; + payload: string; + + constructor(location: string) { + this.payload = location; + } +} + +/** + * Check if token is already present upon initial load. + * @class CheckAuthenticationTokenAction + * @implements {Action} + */ +export class RetrieveAuthMethodsErrorAction implements Action { + public type: string = AuthActionTypes.RETRIEVE_AUTH_METHODS_ERROR; +} + /** * Change the redirect url. * @class SetRedirectUrlAction @@ -343,4 +378,7 @@ export type AuthActions | RegistrationErrorAction | RegistrationSuccessAction | AddAuthenticationMessageAction - | ResetAuthenticationMessagesAction; + | ResetAuthenticationMessagesAction + | RetrieveAuthMethodsAction + | RetrieveAuthMethodsSuccessAction + | RetrieveAuthMethodsErrorAction;