Method: Doorkeeper::AccessTokenMixin#plaintext_token

Defined in:
lib/doorkeeper/models/access_token_mixin.rb

#plaintext_tokenObject

We keep a volatile copy of the raw token for initial communication The stored refresh_token may be mapped and not available in cleartext.

Some strategies allow restoring stored secrets (e.g. symmetric encryption) while hashing strategies do not, so you cannot rely on this value returning a present value for persisted tokens.



423
424
425
426
427
428
429
# File 'lib/doorkeeper/models/access_token_mixin.rb', line 423

def plaintext_token
  if secret_strategy.allows_restoring_secrets?
    secret_strategy.restore_secret(self, :token)
  else
    @raw_token
  end
end