Merge branch 'develop'
This commit is contained in:
@@ -24,6 +24,7 @@ class ABELkeycloakBearerOnlyAdapterExtension extends Extension
|
|||||||
$definition->replaceArgument(1, $config['realm']);
|
$definition->replaceArgument(1, $config['realm']);
|
||||||
$definition->replaceArgument(2, $config['client_id']);
|
$definition->replaceArgument(2, $config['client_id']);
|
||||||
$definition->replaceArgument(3, $config['client_secret']);
|
$definition->replaceArgument(3, $config['client_secret']);
|
||||||
|
$definition->replaceArgument(4, $config['ssl_verification']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAlias()
|
public function getAlias()
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ class Configuration implements ConfigurationInterface
|
|||||||
->scalarNode("client_secret")
|
->scalarNode("client_secret")
|
||||||
->isRequired()
|
->isRequired()
|
||||||
->cannotBeEmpty()
|
->cannotBeEmpty()
|
||||||
|
->end()
|
||||||
|
->scalarNode('ssl_verification')
|
||||||
|
->defaultFalse()
|
||||||
|
->treatNullLike(false)
|
||||||
->end();
|
->end();
|
||||||
|
|
||||||
return $treeBuilder;
|
return $treeBuilder;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<argument/>
|
<argument/>
|
||||||
<argument/>
|
<argument/>
|
||||||
<argument/>
|
<argument/>
|
||||||
|
<argument/>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<service id="ABEL\Bundle\keycloakBearerOnlyAdapterBundle\Security\User\KeycloakBearerUserProvider" alias="abel_keycloak_bearer_only_adapter.keycloak_bearer_user_provider" />
|
<service id="ABEL\Bundle\keycloakBearerOnlyAdapterBundle\Security\User\KeycloakBearerUserProvider" alias="abel_keycloak_bearer_only_adapter.keycloak_bearer_user_provider" />
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ class KeycloakBearerUserProvider implements UserProviderInterface
|
|||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $client_secret;
|
private $client_secret;
|
||||||
|
/**
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
private $sslVerification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* KeycloakBearerUserProvider constructor.
|
* KeycloakBearerUserProvider constructor.
|
||||||
@@ -36,12 +40,13 @@ class KeycloakBearerUserProvider implements UserProviderInterface
|
|||||||
* @param string $client_id
|
* @param string $client_id
|
||||||
* @param string $client_secret
|
* @param string $client_secret
|
||||||
*/
|
*/
|
||||||
public function __construct(string $issuer, string $realm, string $client_id, string $client_secret)
|
public function __construct(string $issuer, string $realm, string $client_id, string $client_secret, $sslVerification)
|
||||||
{
|
{
|
||||||
$this->issuer = $issuer;
|
$this->issuer = $issuer;
|
||||||
$this->realm = $realm;
|
$this->realm = $realm;
|
||||||
$this->client_id = $client_id;
|
$this->client_id = $client_id;
|
||||||
$this->client_secret = $client_secret;
|
$this->client_secret = $client_secret;
|
||||||
|
$this->sslVerification = $sslVerification;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,6 +76,7 @@ class KeycloakBearerUserProvider implements UserProviderInterface
|
|||||||
'http' => '', // Use this proxy with "http"
|
'http' => '', // Use this proxy with "http"
|
||||||
'https' => '', // Use this proxy with "https",
|
'https' => '', // Use this proxy with "https",
|
||||||
],
|
],
|
||||||
|
'verify' => $this->sslVerification,
|
||||||
'http_errors' => false
|
'http_errors' => false
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user