Metadata-Version: 2.1
Name: httpie-ovh-auth
Version: 0.1.0
Summary: OVH auth plugin for HTTPie.
Home-page: https://github.com/lalmeras/httpie_ovh_auth/
Author: Laurent Almeras
Author-email: lalmeras@gmail.com
License: BSD
Download-URL: https://pypi.org/project/httpie_ovh_auth/
Description: # Auth plugin for OVH API
        
        ## Obtain API credentials
        
        You can find URLs to create your application credentials
        (client id and secret) here:
        https://github.com/ovh/python-ovh#1-create-an-application
        
        Then, you need to perform a customer key request and validation.
        
        ```
        # Replace $OVH_CLIENT_ID with the appropriate value
        # Add needed method and path in accessRules list
        http -b post https://api.ovh.com/1.0/auth/credential X-Ovh-Application:$OVH_CLIENT_ID accessRules:='[{"method": "GET", "path": "/*"}]'
        {
            "consumerKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "state": "pendingValidation",
            "validationUrl": "https://eu.api.ovh.com/auth/?credentialToken=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        }
        ```
        
        Visit ``validationUrl`` to validate your consumer key (you need to authenticate
        and choose an expiration delay).
        
        
        ## Credentials in environment
        
        Plugin can use environement variables OVH\_CLIENT\_ID,
        OVH\_CLIENT\_SECRET and OVH\_CONSUMER\_KEY to perform httpie authentication.
        
        Rename ``auth.env.tpl`` to ``auth.env`` and insert your credentials.
        
        Configure your environment before running httpie commands by sourcing this file:
        
        ```
        source auth.env
        ```
        
        Trigger OVH authentication with ``--auth-type`` parameter:
        
        ```
        http -b --auth-type ovh https://api.ovh.com/1.0/me
        ```
        
        
        ## Credentials with ``-a`` option
        
        Not yet implemented.
        
        
        ## Credentials with configuration file
        
        Not yet implemented.
        
        
        ## Interactive credential generation
        
        Not yet implmented.
        
        
        # Implementation
        
        Here is the official API implementation: https://github.com/ovh/python-ovh
        
        
        # OVH API
        
        API documentation available here: https://api.ovh.com/
        
        
        # Development
        
        ```
        ## install pipenv
        # dnf install pipenv or apt install pipenv
        ## init virtualenv with pipenv
        pipenv install --dev
        ## launch tests in pipenv environment
        pytest
        ## launch tests for all envs
        pipenv run tox
        ```
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Environment :: Plugins
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Description-Content-Type: text/markdown
