Class: UffizziCore::Amazon::CredentialService
- Inherits:
-
Object
- Object
- UffizziCore::Amazon::CredentialService
- Defined in:
- app/services/uffizzi_core/amazon/credential_service.rb
Class Method Summary collapse
Class Method Details
.access_token(credential) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/services/uffizzi_core/amazon/credential_service.rb', line 9 def access_token(credential) response = client(credential). base64_data = response.[0]. token_string = Base64.decode64(base64_data) token_items = token_string.split(':') token_items.pop rescue Aws::ECR::Errors::UnrecognizedClientException, Aws::ECR::Errors::InvalidSignatureException '' end |
.credential_correct?(credential) ⇒ Boolean
5 6 7 |
# File 'app/services/uffizzi_core/amazon/credential_service.rb', line 5 def credential_correct?(credential) access_token(credential).present? end |