Class: DockerEngineAPI::Resources::Auth
- Inherits:
-
Object
- Object
- DockerEngineAPI::Resources::Auth
- Defined in:
- lib/docker_engine_api/resources/auth.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Auth
constructor
private
A new instance of Auth.
-
#login(password: nil, serveraddress: nil, username: nil, request_options: {}) ⇒ DockerEngineAPI::Models::AuthResponse
Validate credentials for a registry and, if available, get an identity token for accessing the registry without password.
Constructor Details
#initialize(client:) ⇒ Auth
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Auth.
33 34 35 |
# File 'lib/docker_engine_api/resources/auth.rb', line 33 def initialize(client:) @client = client end |
Instance Method Details
#login(password: nil, serveraddress: nil, username: nil, request_options: {}) ⇒ DockerEngineAPI::Models::AuthResponse
Validate credentials for a registry and, if available, get an identity token for accessing the registry without password.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/docker_engine_api/resources/auth.rb', line 19 def login(params = {}) parsed, = DockerEngineAPI::AuthLoginParams.dump_request(params) @client.request( method: :post, path: "auth", body: parsed, model: DockerEngineAPI::AuthResponse, options: ) end |