| 
| static  | detect ($request_type=null) | 
|   | 
| static  | getServer () | 
|   | 
| static  | getOAuthId ($user_id) | 
|   | 
| static  | detect ($request_type=null) | 
|   | 
| static  | addType ($type, $class) | 
|   | 
| static  | removeType ($type) | 
|   | 
| static  | find ($id) | 
|   | 
| static  | findAll () | 
|   | 
| static  | create ($type) | 
|   | 
| static  | detectConsumer ($type=null, $request_type=null) | 
|   | 
| static  | tableScheme ($db_table) | 
|   | 
| static  | expireTableScheme () | 
|   | 
| static  | find ($id) | 
|   | 
| static  | exists ($id) | 
|   | 
| static  | countBySql ($sql=1, $params=[]) | 
|   | 
| static  | create ($data) | 
|   | 
| static  | build ($data, $is_new=true) | 
|   | 
| static  | buildExisting ($data) | 
|   | 
| static  | import ($data) | 
|   | 
| static  | findBySQL ($sql, $params=[]) | 
|   | 
| static  | findOneBySQL ($where, $params=[]) | 
|   | 
| static  | findThru ($foreign_key_value, $options) | 
|   | 
| static  | findEachBySQL ($callable, $sql, $params=[]) | 
|   | 
| static  | findMany ($pks=[], $order='', $order_params=[]) | 
|   | 
| static  | findEachMany ($callable, $pks=[], $order='', $order_params=[]) | 
|   | 
| static  | findAndMapBySQL ($callable, $where, $params=[]) | 
|   | 
| static  | findAndMapMany ($callable, $pks=[], $order='', $order_params=[]) | 
|   | 
| static  | deleteBySQL ($where, $params=[]) | 
|   | 
| static  | toObject ($id_or_object) | 
|   | 
| static  | __callStatic ($name, $arguments) | 
|   | 
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 @license GPL 2 or later 
 
- Since
 - Stud.IP 3.0 
 
 
◆ __construct()
      
        
          | __construct  | 
          ( | 
            | 
          $id = null | ) | 
           | 
        
      
 
 
◆ before_store()
"Before store" trigger. Creates a clone of the consumer in the tables for the vendor oauth library. 
 
 
◆ configure()
  
  
      
        
          | static configure  | 
          ( | 
            | 
          $config = [] | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Configures the model.
- Parameters
 - 
  
    | array | $config | Configuration array  | 
  
   
Reimplemented from Base.
 
 
◆ detect()
  
  
      
        
          | 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 
 
Reimplemented from Base.
 
 
◆ getOAuthId()
  
  
      
        
          | 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 
 
 
 
◆ getServer()
Returns a singleton instance of the oauth server.
- Returns
 - OAuthServer The server object 
 
 
 
◆ grantAccess()
      
        
          | 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()
      
        
          | 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: