Test CORS policy'

This commit is contained in:
Julius Gruber
2019-06-18 14:30:02 +02:00
parent 8ed359cc7e
commit 4504fa1818
7 changed files with 109 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ import { AuthTokenInfo } from './models/auth-token-info.model';
export const AuthActionTypes = {
AUTHENTICATE: type('dspace/auth/AUTHENTICATE'),
SHIBB_LOGIN: type('dspace/auth/SHIBB_LOGIN'),
AUTHENTICATE_ERROR: type('dspace/auth/AUTHENTICATE_ERROR'),
AUTHENTICATE_SUCCESS: type('dspace/auth/AUTHENTICATE_SUCCESS'),
AUTHENTICATED: type('dspace/auth/AUTHENTICATED'),
@@ -55,6 +56,22 @@ export class AuthenticateAction implements Action {
}
}
/**
* ShibbLoginAction.
* @class ShibbLoginAction
* @implements {Action}
*/
export class ShibbLoginAction implements Action {
public type: string = AuthActionTypes.SHIBB_LOGIN;
payload: {
ssoLoginUrl: string;
};
constructor(ssoLoginUrl: string) {
this.payload = { ssoLoginUrl };
}
}
/**
* Checks if user is authenticated.
* @class AuthenticatedAction
@@ -366,6 +383,7 @@ export class SetRedirectUrlAction implements Action {
*/
export type AuthActions
= AuthenticateAction
| ShibbLoginAction
| AuthenticatedAction
| AuthenticatedErrorAction
| AuthenticatedSuccessAction