Token
Is the unique identification assigned to every registered user on the time of creation. Each user is maintained in that portal or site using this token id.
Token are also used for resetting user password in .NET application
WebSecurity.GeneratePasswordResetToken(userName, expiration)
> %{ newPassword =
> Request["newPassword"];
> confirmPassword =
> Request["confirmPassword"]; token =
> Request["token"]; if IsPost {
> // input testing is ommitted here to save space
> retunValue = ResetPassword(token, newPassword); } } <h1>Change
> Password</h1>
>
> <form method="post" action="">
>
> <label for="newPassword">New
> Password:</label> <input
> type="password" id="newPassword"
> name="newPassword" title="New
> password" />
>
> <label for="confirmPassword">Confirm
> Password:</label> <input
> type="password" id="confirmPassword"
> name="confirmPassword" title="Confirm
> new password" />
>
> <label for="token">Pasword
> Token:</label> <input type="text"
> id="token" name="token"
> title="Password Token" />
>
> <p class="form-actions"> <input
> type="submit" value="Change Password"
> title="Change password" /> </p>
>
> </form>
And at the code behind we will get these values using query string and reset the password
string username=Request.QueryString["userName"];
DateTime expiration=Request.QueryString["expiration"];
0 Comment(s)