Skip to content

Instantly share code, notes, and snippets.

@WinstonFassett
Last active November 14, 2020 17:24
Show Gist options
  • Save WinstonFassett/dc87cb5bcff9fb5b3164d3ca1318c7ea to your computer and use it in GitHub Desktop.
Save WinstonFassett/dc87cb5bcff9fb5b3164d3ca1318c7ea to your computer and use it in GitHub Desktop.
token-authentication-machine
token-authentication-machine
unauthenticated
login -> logging_in
checking_for_local_token
no_token -> no_token
got_token -> authenticating_token
has_unauthenticated_token
authenticate_token -> authenticating_token
no_token
login -> logging_in
authenticate_token -> authenticating_token
logging_in
cancel -> no_token
needs_credentials
request_credentials -> requesting_credentials
requesting_credentials
got_credentials -> authenticating_credentials
authenticating_credentials
credentials_authenticated -> authenticated
invalid_credentials -> no_token
authenticating_token
authenticated_token -> authenticated
invalid_token -> no_token
error -> has_unauthenticated_token
authenticated&
logoff -> no_token
silent_reauthenticate -> authenticating_credentials
reauthenticate -> needs_credentials
token_invalidated -> no_token
valid_token
expiration_watch
not_expiring_soon
expiring_soon -> expiring_soon
expiring_soon
refreshing_login
rerequesting_credentials
got_credentials -> authenticating_credentials
cancel -> no_expiration_action
no_expiration_action
refresh_login -> refreshing_login
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment