Class: Gitlab::DoorkeeperSecretStoring::Sha512Hash

Inherits:
Doorkeeper::SecretStoring::Base
  • Object
show all
Defined in:
lib/gitlab/doorkeeper_secret_storing/sha512_hash.rb

Class Method Summary collapse

Class Method Details

.allows_restoring_secrets?Boolean

Determines whether this strategy supports restoring secrets from the database. This allows detecting users trying to use a non-restorable strategy with reuse_access_tokens.

Returns:

  • (Boolean)


14
15
16
# File 'lib/gitlab/doorkeeper_secret_storing/sha512_hash.rb', line 14

def self.allows_restoring_secrets?
  false
end

.transform_secret(plain_secret) ⇒ Object



6
7
8
# File 'lib/gitlab/doorkeeper_secret_storing/sha512_hash.rb', line 6

def self.transform_secret(plain_secret)
  Digest::SHA512.hexdigest plain_secret
end