accesstoken_class
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
accesstoken_class [2019/11/04 20:21] – sahl | accesstoken_class [2021/02/11 13:47] (current) – [Accesstoken class] Explained anonymous token sahl | ||
---|---|---|---|
Line 20: | Line 20: | ||
</ | </ | ||
- | It is typically | + | This is boiled into a number of methods. |
+ | |||
+ | <code php> | ||
+ | $token = Accesstoken:: | ||
+ | </ | ||
+ | |||
+ | The code above acquires an access token which isn' | ||
+ | |||
+ | To associate an access token with a user, this is done like: | ||
<code php> | <code php> | ||
Line 28: | Line 36: | ||
</ | </ | ||
- | To check if a user is allowed one can simply | + | To check for a valid access token, |
<code php> | <code php> | ||
Line 36: | Line 44: | ||
// The options below will cause a successful validation to make the session valid for ten more minutes. | // The options below will cause a successful validation to make the session valid for ten more minutes. | ||
- | Accesstoken:: | + | Accesstoken:: |
</ | </ | ||
+ | |||
+ | If you make a check like above and redirect the user to a login-page, you can afterwards call the '' | ||
===== Logout ===== | ===== Logout ===== |
accesstoken_class.1572898881.txt.gz · Last modified: 2019/11/04 20:21 by sahl