File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,9 @@ protected function defaultAuth(): TokenAuthenticator
5353
5454 /**
5555 * @throws InvalidArgumentException
56+ * @throws \Exception
5657 */
57- protected function getOrCreateNewOAuthToken ()
58+ protected function getOrCreateNewOAuthToken (): string
5859 {
5960 $ cache = Cache::store ($ this ->configuration ->cacheDriver );
6061
Original file line number Diff line number Diff line change 22
33namespace CodebarAg \DocuWare \DTO \Config ;
44
5+ use Illuminate \Support \Facades \Crypt ;
56use Illuminate \Support \Facades \Hash ;
67
78final class ConfigWithCredentials
@@ -36,7 +37,6 @@ public function __construct(
3637 ?int $ requestTimeoutInSeconds = null ,
3738 ?string $ clientId = null ,
3839 ?string $ scope = null ,
39- ?string $ identifier = null ,
4040 ) {
4141 $ this ->username = $ username ;
4242 $ this ->password = $ password ;
@@ -55,6 +55,6 @@ public function __construct(
5555
5656 $ this ->scope = filled ($ scope ) ? $ scope : config ('laravel-docuware.configurations.scope ' );
5757
58- $ this ->identifier = filled ( $ identifier ) ? $ identifier : Hash::make ($ this ->url .'. ' .$ this ->username .'. ' .$ this ->clientId );
58+ $ this ->identifier = Hash::make ($ this ->url .'. ' .$ this ->username .'. ' .Crypt:: encrypt ( $ this ->password ) );
5959 }
6060}
Original file line number Diff line number Diff line change 22
33namespace CodebarAg \DocuWare \DTO \Config ;
44
5+ use Illuminate \Support \Facades \Crypt ;
56use Illuminate \Support \Facades \Hash ;
67
78final class ConfigWithCredentialsTrustedUser
@@ -39,7 +40,6 @@ public function __construct(
3940 ?int $ requestTimeoutInSeconds = null ,
4041 ?string $ clientId = null ,
4142 ?string $ scope = null ,
42- ?string $ identifier = null ,
4343 ) {
4444 $ this ->username = $ username ;
4545 $ this ->password = $ password ;
@@ -59,6 +59,6 @@ public function __construct(
5959
6060 $ this ->scope = filled ($ scope ) ? $ scope : config ('laravel-docuware.configurations.scope ' );
6161
62- $ this ->identifier = filled ( $ identifier ) ? $ identifier : Hash::make ($ this ->url .'. ' .$ this ->username .'. ' .$ this ->clientId );
62+ $ this ->identifier = Hash::make ($ this ->url .'. ' .$ this ->username .'. ' .Crypt:: encrypt ( $ this ->password ) );
6363 }
6464}
You can’t perform that action at this time.
0 commit comments