Detailed Description
OAuth consumer for the rest api
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL 2 or later
- Since
- Stud.IP 3.0
Constructor & Destructor Documentation
| __construct |
( |
|
$id = null | ) |
|
SimpleORMap constructor, registers neccessary callbacks.
Member Function Documentation
"Before store" trigger. Creates a clone of the consumer in the tables for the vendor oauth library.
| static detect |
( |
|
$request_type = null | ) |
|
|
static |
Detects whether the request is authenticated via OAuth.
- Parameters
-
| mixed | $request_type | Type of request (optional; defaults to any) |
- Returns
- mixed Instance of self if authentication was detected, false otherwise
| static getOAuthId |
( |
|
$user_id | ) |
|
|
static |
Maps a user to an oauth id. This is neccessary due to the fact that the oauth lib works with different ids than Stud.IP.
- Parameters
-
| String | $user_id | Id of the user to get an oauth id for |
- Returns
- String The mapped oauth id
Returns a singleton instance of the oauth server.
- Returns
- OAuthServer The server object
| grantAccess |
( |
|
$user_id = null | ) |
|
Grant oauth access for a user.
- Parameters
-
| mixed | $user_id | Specific user id or null to default to the injected user |
- Exceptions
-
| Exception | If no valid user is present |
| revokeAccess |
( |
|
$user_id = null | ) |
|
Revoke oauth access from a user.
- Parameters
-
| mixed | $user_id | Specific user id or null to default to the injected user |
- Exceptions
-
| Exception | If no valid user is present |
The documentation for this class was generated from the following file: