Skip to content

Commit

Permalink
Update to 1.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: H2CK <dev@jagel.net>
  • Loading branch information
H2CK committed Oct 22, 2024
1 parent 8b9188b commit 471cb1f
Show file tree
Hide file tree
Showing 13 changed files with 2,674 additions and 2,111 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file.

## [1.0.0] - 2024-10-22

### Changed

- Added CLI commands to manage clients (thanks to @opsocket)
- Updated dependencies
- Updated translations

## [0.9.4] - 2024-09-11

### Changed
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Provided features:
- Discovery & WebFinger endpoint provided
- Logout endpoint
- Dynamic Client Registration
- Administration of clients via CLI

Full documentation can be found at:

Expand All @@ -36,6 +37,20 @@ In this area you can:
- Change some overall settings
- Regenerate your public/private key for signeing the id token.

It is also possible to configure the clients via the cli. The following commands are available:

```
$ php occ
...
oidc
oidc:create Create oidc client
oidc:list List oidc clients
oidc:remove Remove an oidc client
...
```

Use the option `--help` to retrieve more information on how to use the commands.

## Endpoints

The following endpoint are available below `index.php/apps/oidc/`:
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Full documentation can be found at:
- [Developer Documentation](https://github.com/H2CK/oidc/wiki#developer-documentation)
]]></description>
<version>0.9.4</version>
<version>1.0.0</version>
<licence>agpl</licence>
<author mail="dev@jagel.net" homepage="https://github.com/H2CK/oidc">Thorsten Jagel</author>
<namespace>OIDCIdentityProvider</namespace>
Expand Down
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,541 changes: 845 additions & 696 deletions js/oidc-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/oidc-main.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions js/oidc-redirect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/oidc-redirect.js.map

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions lib/Command/Clients/OIDCCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,33 @@ protected function configure(): void {
->setDescription('Create oidc client')
->addArgument(
'name',
InputArgument::REQUIRED,
InputArgument::REQUIRED,
'The name of the client'
)
->addArgument(
'redirect_uris',
InputArgument::REQUIRED | InputArgument::IS_ARRAY,
InputArgument::REQUIRED | InputArgument::IS_ARRAY,
'An array of redirect uris'
)
->addOption(
'algorithm',
'a',
InputOption::VALUE_REQUIRED,
'The signing algorithm to use',
'RSA256'
'algorithm',
'a',
InputOption::VALUE_REQUIRED,
'The signing algorithm to use. Can be ´RS256´ or ´HS256´.',
'RS256'
)
->addOption(
'flow',
'f',
InputOption::VALUE_REQUIRED,
'The flow type to use for authentication',
'flow',
'f',
InputOption::VALUE_REQUIRED,
'The flow type to use for authentication. Can be ´code´ or ´code id_token´.',
'code'
)
->addOption(
'type',
't',
InputOption::VALUE_REQUIRED,
'The type of the client',
'type',
't',
InputOption::VALUE_REQUIRED,
'The type of the client. Can be ´public´ or ´confidential´.',
'confidential'
);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Db/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ class Client extends Entity implements JsonSerializable {
public function __construct(
$name = '',
$redirectUris = [],
$algorithm = 'RSA256',
$algorithm = 'RS256',
$type = 'confidential',
$flowType = 'code',
$dcr = false
) {
$this->setName($name);
$this->redirectUris = $redirectUris;
$this->setSigningAlg($algorithm == 'RSA256' ? 'RSA256' : 'HS256');
$this->setSigningAlg($algorithm == 'RS256' ? 'RS256' : 'HS256');
$this->setType($type == 'public' ? 'public' : 'confidential');
$this->setFlowType($flowType);
$this->setFlowType($flowType == 'code' ? 'code' : 'code id_token');
$this->setDcr($dcr);
$this->setIssuedAt(time());

Expand Down
4 changes: 2 additions & 2 deletions lib/Migration/Version0003Date20220927082100.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array
$clients = $this->clientMapper->getClients();

foreach($clients as $client) {
foreach ($client->redirectUris as $uri) {
foreach ($client->getRedirectUris() as $uri) {
$redirectUri = new RedirectUri();
$redirectUri->setClientId($client->getId());
$redirectUri->setRedirectUri($uri);
$this->redirectUriMapper->insert($redirectUri);
$this->redirectUriMapper->insert($redirectUri);
}
}

Expand Down
Loading

0 comments on commit 471cb1f

Please sign in to comment.