Skip to content

Commit 2b501b6

Browse files
authored
Merge pull request #92 from trikoder/release-2.0.0
Release v2.0.0
2 parents f05da2b + 286f100 commit 2b501b6

File tree

3 files changed

+102
-28
lines changed

3 files changed

+102
-28
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [2.0.0] - 2019-08-08
8+
## Added
9+
- Ability to specify a [Defuse](https://github.com/defuse/php-encryption/blob/master/docs/classes/Key.md) key as the encryption key ([d83fefe](https://github.com/trikoder/oauth2-bundle/commit/d83fefe149c1add841d4225ebc2a32aa9333308d))
10+
- Ability to use different PSR-7/17 HTTP transport implementations ([4973e1c](https://github.com/trikoder/oauth2-bundle/commit/4973e1c7ddfc4afcca85989bde1b8d28dcd7fd4a))
11+
- Allow configuration of the private key passphrase ([f16ec67](https://github.com/trikoder/oauth2-bundle/commit/f16ec67f2fa8dbf8fedd78488d625cef2db5b90d))
12+
- Checks if dependent bundles are enabled in the application kernel ([38f6641](https://github.com/trikoder/oauth2-bundle/commit/38f66418b5f28b8666d5bbde1e36a45cfc166afa))
13+
- Console command for clearing expired access and refresh tokens ([de3e338](https://github.com/trikoder/oauth2-bundle/commit/de3e338a24e0b03ab634c4982c46034715635379))
14+
- Console commands for client management ([2425b3d](https://github.com/trikoder/oauth2-bundle/commit/2425b3d149cadb1706eb70b321491bf894114784), [56aafba](https://github.com/trikoder/oauth2-bundle/commit/56aafba995f06e45fd6521735be780c327e67d65))
15+
- Server grant types can now be enabled/disabled through bundle configuration ([baffa92](https://github.com/trikoder/oauth2-bundle/commit/baffa928d9f489bd642fff7ae2bc88ce93badcbf))
16+
- Support for the "authorization_code" server grant type ([a61114a](https://github.com/trikoder/oauth2-bundle/commit/a61114a7f2449bdb28b0779b0a4a7d21b9fff2c2))
17+
- Support for the "implicit" server grant type ([91b3d75](https://github.com/trikoder/oauth2-bundle/commit/91b3d7583e269d5151927f24fbaec9d2fc4cea3d))
18+
- Support for Symfony 4.3 ([e4cf668](https://github.com/trikoder/oauth2-bundle/commit/e4cf6680ddfb7d1327b2c83ed22f46c0db56c67a))
19+
- The bundle is now additionally tested against PHP 7.3 ([9f5937b](https://github.com/trikoder/oauth2-bundle/commit/9f5937bda2a112337a9b375ed3923918bcc06370))
20+
21+
## Changed
22+
- Authentication exceptions are now thrown instead of setting the response object ([8a505f6](https://github.com/trikoder/oauth2-bundle/commit/8a505f61f52d6ce924ab7119a411a17efdf1bbef))
23+
- Modernize bundle service definitions ([fc1f855](https://github.com/trikoder/oauth2-bundle/commit/fc1f8556c180ba961bd6f2c973d36ff7439cbf34), [ef2f557](https://github.com/trikoder/oauth2-bundle/commit/ef2f557f357de8cf39bd87da3499cb38563ad82f))
24+
- Previously [documented](https://github.com/trikoder/oauth2-bundle/blob/v1.1.0/docs/controlling-token-scopes.md) client scope inheriting and restricting is now the new default behavior ([af9bffc](https://github.com/trikoder/oauth2-bundle/commit/af9bffcbcab7b02036c36ba0e1bc7d7b6921280))
25+
- Relaxed the [league/oauth2-server](https://github.com/thephpleague/oauth2-server) package version constraint to allow non-braking changes ([26d9c0b](https://github.com/trikoder/oauth2-bundle/commit/26d9c0b14a4d31e3fd5f620facfa374795f9adeb))
26+
- Use `DateTimeInterface` instead of `DateTime` whenever possible ([4549252](https://github.com/trikoder/oauth2-bundle/commit/454925249bfba1b6fd5c8e07fd64a4e87039759e))
27+
28+
## Fixed
29+
- [DoctrineBundle](https://github.com/doctrine/DoctrineBundle) related deprecation notices ([fbde15b](https://github.com/trikoder/oauth2-bundle/commit/fbde15bfd2295b10563136701f668c839dcc1e5e))
30+
- Not being able to override the "persistence" config tree from other configuration files ([b62b331](https://github.com/trikoder/oauth2-bundle/commit/b62b331834c77609893a1b70633ef7683ada7edc))
31+
- [Symfony](https://github.com/symfony/symfony) related deprecation notices ([601d482](https://github.com/trikoder/oauth2-bundle/commit/601d482351e67d3d22b6ca600e26ed1da7f33866))
32+
33+
## Removed
34+
- Redundant configuration node options ([5fa60ef](https://github.com/trikoder/oauth2-bundle/commit/5fa60efb81fddea79989e502f67bc7aca1bcac16))
35+
- Support for Symfony 4.1 ([4973e1c](https://github.com/trikoder/oauth2-bundle/commit/4973e1c7ddfc4afcca85989bde1b8d28dcd7fd4a))
36+
- Unsupported HTTP verbs on the `/authorize` and `/token` endpoints ([51ef5ae](https://github.com/trikoder/oauth2-bundle/commit/51ef5ae7e659afaf63c024e7da070464d318fd67))
37+
738
## [1.1.0] - 2019-01-07
839
### Added
940
- The bundle is now compatible with Symfony 3.4 ([0ba9cb3](https://github.com/trikoder/oauth2-bundle/commit/0ba9cb306157a9ad89691eb3d20054a6803af472))

README.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -44,68 +44,69 @@ This package is currently in the active development.
4444

4545
```yaml
4646
trikoder_oauth2:
47-
48-
authorization_server:
47+
authorization_server: # Required
4948
5049
# Full path to the private key file.
5150
# How to generate a private key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
52-
private_key: # Required, Example: /var/oauth/private.key
51+
private_key: ~ # Required, Example: /var/oauth/private.key
5352
54-
# Passphrase of the private key, if any.
55-
private_key_passphrase: ~ # Optional, default null
53+
# Passphrase of the private key, if any
54+
private_key_passphrase: null
5655
57-
# The string used as an encryption key.
56+
# The plain string or the ascii safe string used to create a Defuse\Crypto\Key to be used as an encryption key.
5857
# How to generate an encryption key: https://oauth2.thephpleague.com/installation/#string-password
59-
encryption_key: # Required
60-
61-
# The type of encryption key. Is the key a plain value or a ascii safe string that should be passed to Defuse\Crypto\Key?
62-
encryption_key_type: 'plain' # Possible values: "plain", "defuse"
58+
encryption_key: ~ # Required
59+
60+
# The type of value of 'encryption_key'
61+
encryption_key_type: plain # One of "plain"; "defuse"
6362
6463
# How long the issued access token should be valid for.
6564
# The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
66-
access_token_ttl: PT1H
65+
access_token_ttl: PT1H
6766
6867
# How long the issued refresh token should be valid for.
6968
# The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
70-
refresh_token_ttl: P1M
71-
69+
refresh_token_ttl: P1M
70+
71+
# How long the issued auth code should be valid for.
72+
# The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
73+
auth_code_ttl: PT10M
74+
7275
# Whether to enable the client credentials grant
7376
enable_client_credentials_grant: true
74-
77+
7578
# Whether to enable the password grant
7679
enable_password_grant: true
77-
80+
7881
# Whether to enable the refresh token grant
7982
enable_refresh_token_grant: true
8083
81-
# How long the issued auth code should be valid for.
82-
# The value should be a valid interval: http://php.net/manual/en/dateinterval.construct.php#refsect1-dateinterval.construct-parameters
83-
auth_code_ttl: PT10M
84+
# Whether to enable the authorization code grant
85+
enable_auth_code_grant: true
8486
85-
resource_server:
87+
# Whether to enable the implicit grant
88+
enable_implicit_grant: true
89+
resource_server: # Required
8690
8791
# Full path to the public key file
8892
# How to generate a public key: https://oauth2.thephpleague.com/installation/#generating-public-and-private-keys
89-
public_key: # Required, Example: /var/oauth/public.key
93+
public_key: ~ # Required, Example: /var/oauth/public.key
9094
9195
# Scopes that you wish to utilize in your application.
9296
# This should be a simple array of strings.
93-
scopes: []
97+
scopes: []
9498
9599
# Configures different persistence methods that can be used by the bundle for saving client and token data.
96100
# Only one persistence method can be configured at a time.
97-
persistence:
98-
101+
persistence: # Required
99102
doctrine:
100103
101104
# Name of the entity manager that you wish to use for managing clients and tokens.
102-
entity_manager: default # Required
105+
entity_manager: default
106+
in_memory: ~
103107
104-
in_memory: ~
105-
106108
# The priority of the event listener that converts an Exception to a Response
107-
exception_event_listener_priority: 10
108-
109+
exception_event_listener_priority: 10
109110
```
110111

111112
3. Enable the bundle in `config/bundles.php` by adding it to the array:

UPGRADE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Upgrade
2+
Here you will find upgrade steps between major releases.
3+
4+
## From 1.x to 2.x
5+
6+
### PSR-7/17 HTTP transport implementation
7+
8+
The bundle removed a direct dependency on the [zendframework/zend-diactoros](https://github.com/zendframework/zend-diactoros) package. You now need to explicitly install a PSR 7/17 implementation. We recommand that you use [nyholm/psr7](https://github.com/Nyholm/psr7). Check out this [document](https://github.com/trikoder/oauth2-bundle/blob/v2.0.0/docs/psr-implementation-switching.md) if you wish to use a different implementation.
9+
10+
### Scope resolving changes
11+
12+
Previously [documented](https://github.com/trikoder/oauth2-bundle/blob/v1.1.0/docs/controlling-token-scopes.md) client scope inheriting and restricting is now the new default behavior. You can safely remove the listener from your project.
13+
14+
### SQL schema changes
15+
16+
The bundle adds new tables and constraints to the existing schema. You will need to run the Doctrine schema update process to sync the changes:
17+
18+
```sh
19+
bin/console doctrine:schema:update
20+
```
21+
22+
The schema changes include:
23+
24+
* New `oauth2_authorization_code` table for storing authorization codes
25+
* `access_token` field on the `oauth2_refresh_token` table is now nullable
26+
27+
### Interface changes
28+
29+
The following interfaces have been changed:
30+
31+
#### `Trikoder\Bundle\OAuth2Bundle\Manager\ClientManagerInterface`
32+
33+
- [Added the remove() method](https://github.com/trikoder/oauth2-bundle/blob/v2.0.0/Manager/ClientManagerInterface.php#L15)
34+
- [Added the list() method](https://github.com/trikoder/oauth2-bundle/blob/v2.0.0/Manager/ClientManagerInterface.php#L20)
35+
36+
#### `Trikoder\Bundle\OAuth2Bundle\Manager\AccessTokenManagerInterface`
37+
38+
- [Added the clearExpired() method](https://github.com/trikoder/oauth2-bundle/blob/v2.0.0/Manager/AccessTokenManagerInterface.php#L15)
39+
40+
#### `Trikoder\Bundle\OAuth2Bundle\Manager\RefreshTokenManagerInterface`
41+
42+
- [Added the clearExpired() method](https://github.com/trikoder/oauth2-bundle/blob/v2.0.0/Manager/RefreshTokenManagerInterface.php#L15)

0 commit comments

Comments
 (0)