class RefreshTokenEntityNormalizer in Simple OAuth (OAuth2) & OpenID Connect 8.2
Same name and namespace in other branches
- 8.4 src/Normalizer/RefreshTokenEntityNormalizer.php \Drupal\simple_oauth\Normalizer\RefreshTokenEntityNormalizer
- 8.3 src/Normalizer/RefreshTokenEntityNormalizer.php \Drupal\simple_oauth\Normalizer\RefreshTokenEntityNormalizer
- 5.x src/Normalizer/RefreshTokenEntityNormalizer.php \Drupal\simple_oauth\Normalizer\RefreshTokenEntityNormalizer
Hierarchy
- class \Drupal\serialization\Normalizer\NormalizerBase implements \Symfony\Component\Serializer\SerializerAwareInterface, CacheableNormalizerInterface uses \Symfony\Component\Serializer\SerializerAwareTrait
- class \Drupal\simple_oauth\Normalizer\RefreshTokenEntityNormalizer implements TokenEntityNormalizerInterface
Expanded class hierarchy of RefreshTokenEntityNormalizer
1 string reference to 'RefreshTokenEntityNormalizer'
1 service uses RefreshTokenEntityNormalizer
File
- src/
Normalizer/ RefreshTokenEntityNormalizer.php, line 8
Namespace
Drupal\simple_oauth\NormalizerView source
class RefreshTokenEntityNormalizer extends NormalizerBase implements TokenEntityNormalizerInterface {
/**
* The interface or class that this Normalizer supports.
*
* @var string|array
*/
protected $supportedInterfaceOrClass = '\\League\\OAuth2\\Server\\Entities\\RefreshTokenEntityInterface';
/**
* {@inheritdoc}
*/
public function normalize($token_entity, $format = NULL, array $context = array()) {
/** @var \League\OAuth2\Server\Entities\TokenInterface $token_entity */
return [
'value' => $token_entity
->getIdentifier(),
'expire' => $token_entity
->getExpiryDateTime()
->format('U'),
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableNormalizerInterface:: |
constant | Name of key for bubbling cacheability metadata via serialization context. | ||
NormalizerBase:: |
protected | property | List of formats which supports (de-)normalization. | 3 |
NormalizerBase:: |
protected | function | Adds cacheability if applicable. | |
NormalizerBase:: |
protected | function | Checks if the provided format is supported by this normalizer. | 2 |
NormalizerBase:: |
public | function | Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization() | 1 |
NormalizerBase:: |
public | function | Checks whether the given class is supported for normalization by this normalizer. | 1 |
RefreshTokenEntityNormalizer:: |
protected | property |
The interface or class that this Normalizer supports. Overrides NormalizerBase:: |
|
RefreshTokenEntityNormalizer:: |
public | function | Normalizes an object into a set of arrays/scalars. |