src/app/auth/actions/auth.actions.ts
Properties |
|
Methods |
| Static AUTHORIZE |
AUTHORIZE:
|
Type : string
|
Default value : 'AUTHORIZE'
|
|
Defined in src/app/auth/actions/auth.actions.ts:8
|
| Static FORGET_PASSWORD |
FORGET_PASSWORD:
|
Type : string
|
Default value : 'FORGET_PASSWORD'
|
|
Defined in src/app/auth/actions/auth.actions.ts:11
|
| Static FORGET_PASSWORD_SUCCESS |
FORGET_PASSWORD_SUCCESS:
|
Type : string
|
Default value : 'FORGET_PASSWORD_SUCCESS'
|
|
Defined in src/app/auth/actions/auth.actions.ts:12
|
| Static GET_CURRENT_USER |
GET_CURRENT_USER:
|
Type : string
|
Default value : 'GET_CURRENT_USER'
|
|
Defined in src/app/auth/actions/auth.actions.ts:15
|
| Static GET_CURRENT_USER_SUCCESS |
GET_CURRENT_USER_SUCCESS:
|
Type : string
|
Default value : 'GET_CURRENT_USER_SUCCESS'
|
|
Defined in src/app/auth/actions/auth.actions.ts:16
|
| Static GET_RATING_CATEGEORY |
GET_RATING_CATEGEORY:
|
Type : string
|
Default value : 'GET_RATING_CATEGEORY'
|
|
Defined in src/app/auth/actions/auth.actions.ts:17
|
| Static GET_RATING_CATEGEORY_SUCCESS |
GET_RATING_CATEGEORY_SUCCESS:
|
Type : string
|
Default value : 'GET_RATING_CATEGEORY_SUCCESS'
|
|
Defined in src/app/auth/actions/auth.actions.ts:18
|
| Static LOGIN |
LOGIN:
|
Type : string
|
Default value : 'LOGIN'
|
|
Defined in src/app/auth/actions/auth.actions.ts:4
|
| Static LOGIN_SUCCESS |
LOGIN_SUCCESS:
|
Type : string
|
Default value : 'LOGIN_SUCCESS'
|
|
Defined in src/app/auth/actions/auth.actions.ts:5
|
| Static LOGOUT |
LOGOUT:
|
Type : string
|
Default value : 'LOGOUT'
|
|
Defined in src/app/auth/actions/auth.actions.ts:6
|
| Static LOGOUT_SUCCESS |
LOGOUT_SUCCESS:
|
Type : string
|
Default value : 'LOGOUT_SUCCESS'
|
|
Defined in src/app/auth/actions/auth.actions.ts:7
|
| Static NO_OP |
NO_OP:
|
Type : string
|
Default value : 'NO_OPERATION'
|
|
Defined in src/app/auth/actions/auth.actions.ts:10
|
| Static O_AUTH_LOGIN |
O_AUTH_LOGIN:
|
Type : string
|
Default value : 'O_AUTH_LOGIN'
|
|
Defined in src/app/auth/actions/auth.actions.ts:9
|
| Static UPDATE_PASSWORD |
UPDATE_PASSWORD:
|
Type : string
|
Default value : 'UPDATE_PASSWORD'
|
|
Defined in src/app/auth/actions/auth.actions.ts:13
|
| Static UPDATE_PASSWORD_SUCCESS |
UPDATE_PASSWORD_SUCCESS:
|
Type : string
|
Default value : 'UPDATE_PASSWORD_SUCCESS'
|
|
Defined in src/app/auth/actions/auth.actions.ts:14
|
| authorize |
authorize()
|
|
Defined in src/app/auth/actions/auth.actions.ts:21
|
|
Returns :
{ type: string; }
|
| forgetPassword |
forgetPassword()
|
|
Defined in src/app/auth/actions/auth.actions.ts:38
|
|
Returns :
{ type: string; }
|
| forgetPasswordSuccess |
forgetPasswordSuccess()
|
|
Defined in src/app/auth/actions/auth.actions.ts:35
|
|
Returns :
{ type: string; }
|
| getCurrentUser | ||||
getCurrentUser(token: )
|
||||
|
Defined in src/app/auth/actions/auth.actions.ts:65
|
||||
|
Parameters :
Returns :
{ type: string; payload: any; }
|
| getCurrentUserSuccess | ||||||
getCurrentUserSuccess(user: User)
|
||||||
|
Defined in src/app/auth/actions/auth.actions.ts:72
|
||||||
|
Parameters :
Returns :
{ type: string; payload: any; }
|
| getRatingCategories |
getRatingCategories()
|
|
Defined in src/app/auth/actions/auth.actions.ts:79
|
|
Returns :
{ type: string; }
|
| getRatingCategoriesSuccess | ||||||
getRatingCategoriesSuccess(ratingCategories: Array
|
||||||
|
Defined in src/app/auth/actions/auth.actions.ts:85
|
||||||
|
Parameters :
Returns :
{ type: string; payload: any; }
|
| login |
login()
|
|
Defined in src/app/auth/actions/auth.actions.ts:25
|
|
Returns :
{ type: string; }
|
| loginSuccess |
loginSuccess()
|
|
Defined in src/app/auth/actions/auth.actions.ts:49
|
|
Returns :
{ type: string; }
|
| logout |
logout()
|
|
Defined in src/app/auth/actions/auth.actions.ts:53
|
|
Returns :
{ type: string; }
|
| logoutSuccess |
logoutSuccess()
|
|
Defined in src/app/auth/actions/auth.actions.ts:57
|
|
Returns :
{ type: string; }
|
| noOp |
noOp()
|
|
Defined in src/app/auth/actions/auth.actions.ts:61
|
|
Returns :
{ type: string; }
|
| oAuthLogin | ||||||
oAuthLogin(provider: string)
|
||||||
|
Defined in src/app/auth/actions/auth.actions.ts:29
|
||||||
|
Parameters :
Returns :
{ type: string; payload: string; }
|
| updatePassword |
updatePassword()
|
|
Defined in src/app/auth/actions/auth.actions.ts:45
|
|
Returns :
{ type: string; }
|
| updatePasswordSuccess |
updatePasswordSuccess()
|
|
Defined in src/app/auth/actions/auth.actions.ts:42
|
|
Returns :
{ type: string; }
|
import { User } from '../../core/models/user';
import { RatingCategory } from '../../core/models/rating_category';
export class AuthActions {
static LOGIN = 'LOGIN';
static LOGIN_SUCCESS = 'LOGIN_SUCCESS';
static LOGOUT = 'LOGOUT';
static LOGOUT_SUCCESS = 'LOGOUT_SUCCESS';
static AUTHORIZE = 'AUTHORIZE';
static O_AUTH_LOGIN = 'O_AUTH_LOGIN';
static NO_OP = 'NO_OPERATION'
static FORGET_PASSWORD = 'FORGET_PASSWORD';
static FORGET_PASSWORD_SUCCESS = 'FORGET_PASSWORD_SUCCESS';
static UPDATE_PASSWORD = 'UPDATE_PASSWORD';
static UPDATE_PASSWORD_SUCCESS = 'UPDATE_PASSWORD_SUCCESS';
static GET_CURRENT_USER = 'GET_CURRENT_USER';
static GET_CURRENT_USER_SUCCESS = 'GET_CURRENT_USER_SUCCESS';
static GET_RATING_CATEGEORY = 'GET_RATING_CATEGEORY';
static GET_RATING_CATEGEORY_SUCCESS = 'GET_RATING_CATEGEORY_SUCCESS';
authorize() {
return { type: AuthActions.AUTHORIZE };
}
login() {
return { type: AuthActions.LOGIN };
}
oAuthLogin(provider: string) {
return {
type: AuthActions.O_AUTH_LOGIN,
payload: provider
};
}
forgetPasswordSuccess() {
return { type: AuthActions.FORGET_PASSWORD_SUCCESS };
}
forgetPassword() {
return { type: AuthActions.FORGET_PASSWORD };
}
updatePasswordSuccess() {
return { type: AuthActions.UPDATE_PASSWORD_SUCCESS };
}
updatePassword() {
return { type: AuthActions.UPDATE_PASSWORD };
}
loginSuccess() {
return { type: AuthActions.LOGIN_SUCCESS };
}
logout() {
return { type: AuthActions.LOGOUT };
}
logoutSuccess() {
return { type: AuthActions.LOGOUT_SUCCESS };
}
noOp() {
return { type: AuthActions.NO_OP };
}
getCurrentUser(token) {
return {
type: AuthActions.GET_CURRENT_USER,
payload: token
}
}
getCurrentUserSuccess(user: User) {
return {
type: AuthActions.GET_CURRENT_USER_SUCCESS,
payload: user
}
}
getRatingCategories() {
return {
type: AuthActions.GET_RATING_CATEGEORY
}
}
getRatingCategoriesSuccess(ratingCategories: Array<RatingCategory>) {
return {
type: AuthActions.GET_RATING_CATEGEORY_SUCCESS,
payload: ratingCategories
}
}
}