for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Eljam\GuzzleJwt\Strategy\Auth;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* @author Guillaume Cavana <[email protected]>
*/
class QueryAuthStrategy extends AbstractBaseAuthStrategy
{
* {@inheritdoc}
public function configureOptions(OptionsResolver $resolver)
parent::configureOptions($resolver);
$resolver->setDefaults([
'query_fields' => ['username', 'password'],
]);
$resolver->setRequired(['query_fields']);
}
public function getRequestOptions()
return [
\GuzzleHttp\RequestOptions::QUERY => [
$this->options['query_fields'][0] => $this->options['username'],
$this->options['query_fields'][1] => $this->options['password'],
],
];