Class: Gitlab::DoorkeeperSecretStoring::Token::UniqueApplicationToken

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/doorkeeper_secret_storing/token/unique_application_token.rb

Constant Summary collapse

OAUTH_APPLICATION_SECRET_PREFIX_FORMAT =

Acronym for ‘GitLab OAuth Application Secret’

"gloas-%{token}"

Class Method Summary collapse

Class Method Details

.generateObject

Maintains compatibility with ::Doorkeeper::OAuth::Helpers::UniqueToken Returns a secure random token, prefixed with a GitLab identifier.



12
13
14
# File 'lib/gitlab/doorkeeper_secret_storing/token/unique_application_token.rb', line 12

def self.generate(*)
  format(OAUTH_APPLICATION_SECRET_PREFIX_FORMAT, token: SecureRandom.hex(32))
end