Skip to content

Instantly share code, notes, and snippets.

@grahaml
Last active October 23, 2018 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahaml/9d880d1b4dece522b3cd04792d872321 to your computer and use it in GitHub Desktop.
Save grahaml/9d880d1b4dece522b3cd04792d872321 to your computer and use it in GitHub Desktop.
Single Auth Source
Single Auth Source
Credentials Form*
# This is an Input Field, described in submachine below
Email Field Active
enter email -> Password Field Active
# This is an Input Field, described in submachine below
Password Field Active
enter password -> Credentials Filled
Credentials Filled
submit -> Valid?
Valid?
yes -> Credentials Success?
no -> Credentials Field Error
Credentials Field Error
enter email -> Credentials Filled
enter password -> Credentials Filled
Credentials Success?
true -> MFA Form
credentials error -> Credentials Error
server error -> Credentials Server Error
Credentials Server Error
enter text -> Credentials Filled
clear text -> Credentials Form
Credentials Error
enter text -> Credentials Filled
clear text -> Credentials Form
MFA Form
Code Field Active
enter text -> MFA Filled
clear text -> MFA Form
MFA Filled
submit -> MFA Valid?
MFA Valid?
yes -> MFA Success?
code error -> MFA Code Error
server error -> MFA Server Error
MFA Success?
true -> Logged In
code error -> MFA Code Error
server error -> MFA Server Error
MFA Code Error
enter text -> MFA Filled
clear text -> MFA Form
MFA Server Error
enter text -> MFA Filled
clear text -> MFA Form
Logged In
## The below represents a submachine for individual input fields
Input Field
Empty
enter incorrect text -> Filled
enter correct text -> Filled
Filled
clear text -> Empty
blur -> Validated
Validated
Valid*
enter incorrect text -> Invalid
Invalid
enter correct text -> Valid
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