Skip to content

Commit 7717c9d

Browse files
committed
Remove support for web.auth.oauth.Token (removed!)
1 parent 7643f30 commit 7717c9d

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

src/main/php/web/auth/oauth/OAuth1Flow.class.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)