Skip to content

Commit 352247f

Browse files
committed
Allow getting the token value
Also removes the old method I never actually wrote.
1 parent 43c9a3b commit 352247f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

inc/tokens/class-token.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace WP\OAuth2\Tokens;
44

55
abstract class Token {
6+
protected $key;
7+
protected $value;
8+
69
protected function __construct( $key, $value ) {
710
$this->key = $key;
811
$this->value = $value;
@@ -12,6 +15,15 @@ public function get_key() {
1215
return $this->key;
1316
}
1417

18+
/**
19+
* Get the token's value.
20+
*
21+
* @return mixed $value Token value, specific to the token type.
22+
*/
23+
public function get_value() {
24+
return $this->value;
25+
}
26+
1527
/**
1628
* Check if the token is valid.
1729
*
@@ -29,5 +41,4 @@ public function is_valid() {
2941
public function get_meta_key() {
3042
return static::get_meta_prefix() . $this->get_key();
3143
}
32-
public abstract function to_meta_value();
3344
}

0 commit comments

Comments
 (0)