Skip to content

Instantly share code, notes, and snippets.

@jgwhite
Created June 1, 2018 13:03
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 jgwhite/5ab2bc6541602ff1f27e562526a883c5 to your computer and use it in GitHub Desktop.
Save jgwhite/5ab2bc6541602ff1f27e562526a883c5 to your computer and use it in GitHub Desktop.
IdP Config Flow
IdP Config Flow
SSO Not Installed
Click begin setup -> SSO Not Configured
SSO Not Configured
Submit valid configuration -> SSO Disabled
Submit valid configuration with enabled true -> SSO Enabled
SSO Enabled
Submit enabled false -> SSO Disabled
SSO Disabled
Submit enabled true -> SSO Enabled
function render(model){
let current_state_name = model.active_states[0].name;
switch (model.active_states[0].name) {
case 'SSO Not Installed':
return $('button',
{ onClick: () => model.emit('Click begin setup') },
'Begin setup');
case 'SSO Not Configured':
return $('button',
{ onClick: (e) => model.emit('Submit valid configuration') },
'Submit valid configuration');
case 'SSO Disabled':
return $('button',
{ onClick: () => model.emit('Submit enabled true') },
'Enable');
case 'SSO Enabled':
return $('button',
{ onClick: () => model.emit('Submit enabled false') },
'Disable');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment