lob / lob-php

PHP Client for Lob API
https://lob.com
MIT License
67 stars 21 forks source link

Misleading authentication example #182

Open rooholamin opened 9 months ago

rooholamin commented 9 months ago

Summary

The documentation on authentication is very misleading. There is no username or password in lob account for basic authentication. It only provides api keys.

Current Behavior

// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

Possible Solution

This is the correct way to have configuration:


// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
              ->setApiKey('basic', 'API_KEY);