Skip to content

Commit

Permalink
fix keycloak class data types
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-haris committed Oct 27, 2024
1 parent 2ddcffc commit 6287acf
Showing 1 changed file with 55 additions and 63 deletions.
118 changes: 55 additions & 63 deletions src/Keycloak.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,75 +26,67 @@
*/
class Keycloak implements KeycloakInterface
{
/**
* The HTTP client instance.
*
* @var Client
*/
protected Client $httpClient;

/**
* The base URL for Keycloak.
*
* @var string
*/
private string $baseUrl;

/**
* The username for the keycloak admin.
*
* @var ?string
*/
private ?string $username;

/**
* The password for the keycloak admin.
*
* @var ?string
*/
private ?string $password;

/**
* The realm for which requests are made.
*
* @var ?string
*/
private ?string $realm;

/**
* The client ID.
*
* @var ?string
*/
protected ?string $clientId;

/**
* The client secret.
*
* @var ?string
*/
protected ?string $clientSecret;

/**
* The grant type.
*
* @var ?GrantType
*/
protected ?GrantType $grantType;

/**
* KeycloakClient constructor.
*
* Initializes the HTTP client and retrieves the access token.
*/
public function __construct(
?string $baseUrl = null,
?string $realm = null,
?string $username = null,
?string $password = null,
?string $clientId = null,
?string $clientSecret = null,
?string $grantType = null
/**
* The HTTP client instance.
*
* @var Client
*/
public Client $httpClient,

/**
* The base URL for Keycloak.
*
* @var string
*/
public ?string $baseUrl,

/**
* The realm for which requests are made.
*
* @var ?string
*/
public ?string $realm,

/**
* The username for the keycloak admin.
*
* @var ?string
*/
public ?string $username,

/**
* The password for the keycloak admin.
*
* @var ?string
*/
public ?string $password,

/**
* The client ID.
*
* @var ?string
*/
public ?string $clientId,

/**
* The client secret.
*
* @var ?string
*/
public ?string $clientSecret = null,

/**
* The grant type.
*
* @var ?GrantType
*/
public ?GrantType $grantType = null
)
{
$this->username = $username ?? config('keycloak.username');
Expand Down

0 comments on commit 6287acf

Please sign in to comment.