Site:API:Authentication
From Metrixstream
(Difference between revisions)
MetrixJustin (Talk | contribs) (→Error Handling) |
MetrixJustin (Talk | contribs) (→Login) |
||
Line 40: | Line 40: | ||
<input type="submit" value="Login" /> | <input type="submit" value="Login" /> | ||
</form></nowiki> | </form></nowiki> | ||
+ | |||
+ | = Signup = | ||
+ | |||
+ | = Logout = |
Revision as of 17:53, 2 July 2012
Contents |
Login
Post URL
The login post URL can be generated using the getLoginPostUrl() macro, or posting to getBasePostUrl() with an action of login.
Example:
<?cs call:getLoginPostUrl() ?>
or
<?cs call:getBasePostUrl() ?>?action=login
Required Parameters
Username Password
Optional Parameters
mode continue retry
Error Handling
A failed form submission will populate MS.error in the retry page HDF with the reason why the form has failed.
Complete Example
<form action="<?cs call:getLoginPostUrl() ?>" method="post"> <input type="hidden" name="continue" value="<?cs call:getPageUrl('successPage') ?>" /> <input type="hidden" name="retry" value="<?cs call:getPageUrl('retryPage') ?>" /> <?cs if:MS.error ?> <div id="error"><?cs var:MS.error ?></div> <?cs /if ?> <label>Username</label> <input type="text" name="username" value="" /> <label>Password</label> <input type="text" name="password" value="" /> <input type="submit" value="Login" /> </form>