Created
          December 9, 2014 12:33 
        
      - 
      
- 
        Save ezimuel/b3f5a07486bf9c8903c1 to your computer and use it in GitHub Desktop. 
    Example: OAuth2 configuration for Apigility 
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // config/autoload/global.php | |
| // ... | |
| 'router' => array( | |
| 'routes' => array( | |
| 'oauth' => array( | |
| 'options' => array( | |
| 'route' => '/oauth', | |
| ), | |
| ), | |
| ), | |
| ), | |
| // ... | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // config/autoload/local.php | |
| // ... | |
| 'zf-oauth2' => array( | |
| 'storage' => 'ZF\\OAuth2\\Adapter\\PdoAdapter', | |
| 'db' => array( | |
| 'dsn_type' => 'PDO', | |
| 'dsn' => 'sqlite:/path-to-apigility/vendor/zfcampus/zf-oauth2/data/dbtest.sqlite', | |
| 'username' => null, | |
| 'password' => null, | |
| ), | |
| ), | |
| // ... | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // module/Test/config/module.config.php | |
| // ... | |
| 'zf-mvc-auth' => array( | |
| 'authorization' => array( | |
| 'Test\\V1\\Rest\\Ping\\Controller' => array( | |
| 'entity' => array( | |
| 'GET' => false, | |
| 'POST' => false, | |
| 'PATCH' => false, | |
| 'PUT' => false, | |
| 'DELETE' => false, | |
| ), | |
| 'collection' => array( | |
| 'GET' => true, | |
| 'POST' => true, | |
| 'PATCH' => true, | |
| 'PUT' => true, | |
| 'DELETE' => false, | |
| ), | |
| ), | |
| ), | |
| ), | |
| // ... | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment