mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Get tokoen from backend
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// import @ngrx
|
||||
import { Action } from '@ngrx/store';
|
||||
import {Action} from '@ngrx/store';
|
||||
|
||||
// import type function
|
||||
import { type } from '../../shared/ngrx/type';
|
||||
import {type} from '../../shared/ngrx/type';
|
||||
|
||||
// import models
|
||||
import { EPerson } from '../eperson/models/eperson.model';
|
||||
import { AuthTokenInfo } from './models/auth-token-info.model';
|
||||
import {EPerson} from '../eperson/models/eperson.model';
|
||||
import {AuthTokenInfo} from './models/auth-token-info.model';
|
||||
|
||||
export const AuthActionTypes = {
|
||||
AUTHENTICATE: type('dspace/auth/AUTHENTICATE'),
|
||||
@@ -52,7 +52,7 @@ export class AuthenticateAction implements Action {
|
||||
};
|
||||
|
||||
constructor(email: string, password: string) {
|
||||
this.payload = { email, password };
|
||||
this.payload = {email, password};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,13 +63,6 @@ export class AuthenticateAction implements Action {
|
||||
*/
|
||||
export class ShibbLoginAction implements Action {
|
||||
public type: string = AuthActionTypes.SHIBB_LOGIN;
|
||||
payload: {
|
||||
ssoLoginUrl: string;
|
||||
};
|
||||
|
||||
constructor(ssoLoginUrl: string) {
|
||||
this.payload = { ssoLoginUrl };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,7 +93,7 @@ export class AuthenticatedSuccessAction implements Action {
|
||||
};
|
||||
|
||||
constructor(authenticated: boolean, authToken: AuthTokenInfo, user: EPerson) {
|
||||
this.payload = { authenticated, authToken, user };
|
||||
this.payload = {authenticated, authToken, user};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +107,7 @@ export class AuthenticatedErrorAction implements Action {
|
||||
payload: Error;
|
||||
|
||||
constructor(payload: Error) {
|
||||
this.payload = payload ;
|
||||
this.payload = payload;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +121,7 @@ export class AuthenticationErrorAction implements Action {
|
||||
payload: Error;
|
||||
|
||||
constructor(payload: Error) {
|
||||
this.payload = payload ;
|
||||
this.payload = payload;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +164,9 @@ export class CheckAuthenticationTokenErrorAction implements Action {
|
||||
*/
|
||||
export class LogOutAction implements Action {
|
||||
public type: string = AuthActionTypes.LOG_OUT;
|
||||
constructor(public payload?: any) {}
|
||||
|
||||
constructor(public payload?: any) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -184,7 +179,7 @@ export class LogOutErrorAction implements Action {
|
||||
payload: Error;
|
||||
|
||||
constructor(payload: Error) {
|
||||
this.payload = payload ;
|
||||
this.payload = payload;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +190,9 @@ export class LogOutErrorAction implements Action {
|
||||
*/
|
||||
export class LogOutSuccessAction implements Action {
|
||||
public type: string = AuthActionTypes.LOG_OUT_SUCCESS;
|
||||
constructor(public payload?: any) {}
|
||||
|
||||
constructor(public payload?: any) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -208,7 +205,7 @@ export class RedirectWhenAuthenticationIsRequiredAction implements Action {
|
||||
payload: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.payload = message ;
|
||||
this.payload = message;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +219,7 @@ export class RedirectWhenTokenExpiredAction implements Action {
|
||||
payload: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.payload = message ;
|
||||
this.payload = message;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +284,7 @@ export class RegistrationErrorAction implements Action {
|
||||
payload: Error;
|
||||
|
||||
constructor(payload: Error) {
|
||||
this.payload = payload ;
|
||||
this.payload = payload;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +368,7 @@ export class SetRedirectUrlAction implements Action {
|
||||
payload: string;
|
||||
|
||||
constructor(url: string) {
|
||||
this.payload = url ;
|
||||
this.payload = url;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user