From daebacf9cb9700806b76bf77a717cea484f86c01 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 2 Jul 2017 19:01:28 +0100 Subject: [PATCH] Added upgrade guide --- _data/menu.yml | 1 + installation.md | 2 +- upgrade-guide.md | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 upgrade-guide.md diff --git a/_data/menu.yml b/_data/menu.yml index e01ec990..38e3fa82 100644 --- a/_data/menu.yml +++ b/_data/menu.yml @@ -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/' diff --git a/installation.md b/installation.md index c83972ab..de16146e 100755 --- a/installation.md +++ b/installation.md @@ -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;' diff --git a/upgrade-guide.md b/upgrade-guide.md new file mode 100644 index 00000000..7ca79ad2 --- /dev/null +++ b/upgrade-guide.md @@ -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 %}