Class: UffizziCore::GithubContainerRegistry::CredentialService

Inherits:
Object
  • Object
show all
Defined in:
app/services/uffizzi_core/github_container_registry/credential_service.rb

Class Method Summary collapse

Class Method Details

.access_token(credential) ⇒ Object



11
12
13
14
15
# File 'app/services/uffizzi_core/github_container_registry/credential_service.rb', line 11

def access_token(credential)
  client(credential).token
rescue URI::InvalidURIError, Faraday::ConnectionFailed
  false
end

.credential_correct?(credential) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
# File 'app/services/uffizzi_core/github_container_registry/credential_service.rb', line 5

def credential_correct?(credential)
  client(credential).authentificated?
rescue URI::InvalidURIError, Faraday::ConnectionFailed
  false
end