mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 13:09:44 +05:30
Added upgrade guide
This commit is contained in:
parent
823df7fc8c
commit
daebacf9cb
@ -3,6 +3,7 @@ Getting Started:
|
||||
Terminology: '/terminology/'
|
||||
Requirements: '/requirements/'
|
||||
Installation: '/installation/'
|
||||
Upgrade Guide: '/upgrade-guide/'
|
||||
Database Setup: '/database-setup/'
|
||||
Framework Integrations: '/framework-integrations/'
|
||||
V5 Security Improvements: '/v5-security-improvements/'
|
||||
|
@ -54,7 +54,7 @@ The public key should be distributed to any services (for example resource serve
|
||||
|
||||
## Generating encryption keys
|
||||
|
||||
To generate an encryption key for the `AuthorizationServer` run the following code:
|
||||
To generate an encryption key for the `AuthorizationServer` run the following command in the terminal:
|
||||
|
||||
{% highlight shell %}
|
||||
php -r 'echo base64_encode(random_bytes(32)), PHP_EOL;'
|
||||
|
30
upgrade-guide.md
Normal file
30
upgrade-guide.md
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
layout: default
|
||||
title: Upgrade Guide
|
||||
permalink: /upgrade-guide/
|
||||
---
|
||||
|
||||
# Upgrade Guide
|
||||
|
||||
## 5.1.x → 6.0.x
|
||||
|
||||
Version `6.0.0` is not backwards compatible with version `5.1.x` but only requires you to make one like of code change:
|
||||
|
||||
```patch
|
||||
$server = new AuthorizationServer(
|
||||
$clientRepository,
|
||||
$accessTokenRepository,
|
||||
$scopeRepository,
|
||||
$privateKeyPath,
|
||||
+ 'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen'
|
||||
- $publicKeyPath
|
||||
);
|
||||
```
|
||||
|
||||
All you need to do is replace the public key that was being passed into the constructor of `AuthorizationServer` with a 32 bit encryption key.
|
||||
|
||||
To generate an encryption key for the `AuthorizationServer` run the following command in the terminal:
|
||||
|
||||
{% highlight shell %}
|
||||
php -r 'echo base64_encode(random_bytes(32)), PHP_EOL;'
|
||||
{% endhighlight %}
|
Loading…
Reference in New Issue
Block a user