Class: UffizziCore::Controller::CreateCredential::CredentialSerializer

Inherits:
BaseSerializer
  • Object
show all
Defined in:
app/serializers/uffizzi_core/controller/create_credential/credential_serializer.rb

Instance Method Summary collapse

Instance Method Details

#passwordObject



12
13
14
15
16
17
18
# File 'app/serializers/uffizzi_core/controller/create_credential/credential_serializer.rb', line 12

def password
  if object.amazon?
    UffizziCore::ContainerRegistry::AmazonService.access_token(object)
  else
    object.password
  end
end

#usernameObject



6
7
8
9
10
# File 'app/serializers/uffizzi_core/controller/create_credential/credential_serializer.rb', line 6

def username
  return 'AWS' if object.amazon?

  object.username
end