File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ public function getAdminUri(
109109
110110 public function getLogoutUri (string $ returnToPath = null ):UriInterface {
111111 if (is_null ($ returnToPath )) {
112- $ returnToPath = $ this ->currentUriPath ;
112+ $ returnToPath = ( new Uri ( $ this ->currentUriPath ))-> getPath () ;
113113 }
114114
115115 return new LogoutUri ($ this ->authwaveHost , $ returnToPath );
Original file line number Diff line number Diff line change 11<?php
22namespace Authwave ;
33
4- use JsonException ;
5-
64class Token {
75 const ENCRYPTION_METHOD = "aes128 " ;
86
@@ -48,25 +46,22 @@ public function decryptResponseCipher(string $cipher):UserData {
4846 $ decrypted = openssl_decrypt (
4947 base64_decode ($ cipher ),
5048 self ::ENCRYPTION_METHOD ,
51- implode ("| " , [
52- $ this ->key ,
53- $ this ->secretIv ->getBytes (),
54- ]),
49+ $ this ->key ,
5550 0 ,
56- $ this ->iv ->getBytes ()
51+ $ this ->secretIv ->getBytes ()
5752 );
5853
5954 if (!$ decrypted ) {
6055 throw new ResponseCipherDecryptionException ();
6156 }
6257
63- $ obj = unserialize (
58+ $ data = unserialize (
6459 $ decrypted
6560 );
66- if ($ obj === false ) {
61+ if ($ data === false ) {
6762 throw new InvalidUserDataSerializationException ();
6863 }
6964
70- return new UserData ($ obj -> uuid , $ obj -> email );
65+ return new UserData ($ data [ " uuid " ] , $ data [ " email " ] );
7166 }
7267}
You can’t perform that action at this time.
0 commit comments