Skip to content

Commit

Permalink
feat(auth): add DaffAuthResetToUnauthenticated (#2504)
Browse files Browse the repository at this point in the history
  • Loading branch information
griest024 committed Jul 13, 2023
1 parent 0f0d0c3 commit 57127d3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libs/auth/state/src/actions/auth.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Action } from '@ngrx/store';
import { DaffStateError } from '@daffodil/core/state';

export enum DaffAuthActionTypes {
ResetToUnauthenticatedAction = '[@daffodil/auth] Reset To Unauthenticated Action',
AuthStorageFailureAction = '[@daffodil/auth] Auth Storage Failure Action',
AuthGuardLogoutAction = '[@daffodil/auth] Auth Guard Logout Action',
AuthServerSideAction = '[@daffodil/auth] Auth Server Side Action',
Expand All @@ -11,6 +12,14 @@ export enum DaffAuthActionTypes {
AuthCheckFailureAction = '[@daffodil/auth] Auth Check Failure Action',
}

/*
* An action triggered when the authenicated status of the user is invalidated for some reason.
* That reason could be a logout, auth token check failure, or an unauthorized error.
*/
export class DaffAuthResetToUnauthenticated implements Action {
readonly type = DaffAuthActionTypes.ResetToUnauthenticatedAction;
}

/*
* An action triggered upon a failed auth storage operation.
*/
Expand Down Expand Up @@ -67,6 +76,7 @@ export class DaffAuthCheckFailure implements Action {
}

export type DaffAuthActions =
| DaffAuthResetToUnauthenticated
| DaffAuthStorageFailure
| DaffAuthGuardLogout
| DaffAuthServerSide
Expand Down

0 comments on commit 57127d3

Please sign in to comment.