Last post Feb 19, 2016 01:50 PM by Yohann Lu
Feb 15, 2016 12:56 PM|sudip_inn|LINK
what is token......is it any dynamic alpha numeric no ?
what is access and refresh token and how to implement it ?
token is stored in cookie or it is always go back and forth along with url ?
what is bearer token ? how many different kind of token exist ?
sample response for token
".issued":"Wed, 01 Oct 2014 01:22:33 GMT",
".expires":"Wed, 15 Oct 2014 01:22:33 GMT"
what is "expires_in":1209599, ?
Feb 16, 2016 07:43 AM|Yohann Lu|LINK
1: Token is an arbitrary user-defined string (encrypted, unique identifier).
2: How to implement token, you can refer the following tutorial:
Secure a Web API with Individual Accounts and Local Login in ASP.NET Web API 2.2:
3: You can store token in cookies. When you access the API, you need to take token information.
4: Bearer tokens are the default type of access tokens. They are automatically enabled when either an Authorization Server or Resource Server is initialized.
There are also have another token is MAC Tokens. A MAC (Message Authentication Code) is a short piece of information used to authenticate a message and to provide integrity and authenticity assurances on the message.
More information about Token Types:
5: The "expires_in" means The total time period of validity (in seconds). For example, 15 days is 1,296,000 seconds.
Feb 16, 2016 08:24 AM|sudip_inn|LINK
where developer defined the token string ?
how to store token in cookie ? do i need to write code to store token in cookie ?
what is common approach that people store token in persistent cookie or it is always go back and forth along with url ?
4: Bearer tokens are the default type of access tokens
what kind of info is store inside Bearer tokens ?
if i need to store some custom info then how could i store it in Bearer tokens ?
please answer in details point wise. thanks
Feb 19, 2016 01:50 PM|Yohann Lu|LINK
1: where developer defined the token string ?
You can refer the following tutorial. You will learn a lot. The following tutorial implement RSA public/private token in the Web API service.
2: how to store token in cookie ? do I need to write code to store token in cookie ?
HttpCookie cookie = new HttpCookie("Token");
cookie.Value = "Hkjkjsjoijsoi883833k3";
3: what kind of info is store inside Bearer tokens ? The following article describes a Bearer Token and MAC Token, you can refer to it.
OAuth 2.0 Bearer Token Profile Vs MAC Token Profile :
4: if I need to store some custom info then how could I store it in Bearer tokens ?
You can refer to the first information.