Skip to content

Commit

Permalink
JWKs
Browse files Browse the repository at this point in the history
  • Loading branch information
sethsandaru committed Oct 15, 2023
1 parent 0107144 commit 53b8da1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Entities/Key.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function fromFilePath(string $filePath, KeyConfiguration $options)
return $keyInstance;
}

public function toJWK()
public function toJWK(): array
{
return app(KeyFactory::class)
->createFromPem($this->key, array_filter([
Expand Down
9 changes: 6 additions & 3 deletions src/Entities/KeyConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

class KeyConfiguration
{
public ?string $keyId = null;
public ?string $algorithm = null;
public ?string $use = null;
public function __construct(
public ?string $keyId = null,
public ?string $algorithm = null,
public ?string $use = null
) {
}
}

0 comments on commit 53b8da1

Please sign in to comment.