File tree Expand file tree Collapse file tree
src/main/php/web/auth/oauth Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,16 +19,10 @@ class OAuth1Flow extends OAuthFlow {
1919 public function __construct ($ service , $ consumer , $ callback = '/ ' ) {
2020 $ this ->namespace = 'oauth1::flow ' ;
2121 $ this ->service = rtrim ($ service , '/ ' );
22-
23- // BC: Support web.auth.oauth.Token instances
24- if ($ consumer instanceof Credentials) {
25- $ this ->signature = new Signature ($ consumer );
26- } else if ($ consumer instanceof Token) {
27- $ this ->signature = new Signature (new BySecret ($ consumer ->key ()->reveal (), $ consumer ->secret ()));
28- } else {
29- $ this ->signature = new Signature (new BySecret (...$ consumer ));
30- }
31-
22+ $ this ->signature = new Signature ($ consumer instanceof Credentials
23+ ? $ consumer
24+ : new BySecret (...$ consumer )
25+ );
3226 $ this ->callback = $ callback instanceof URI ? $ callback : new URI ($ callback );
3327 }
3428
You can’t perform that action at this time.
0 commit comments