Class: RakeFly::Tasks::Authentication::Login::ApiBackend
- Inherits:
-
Object
- Object
- RakeFly::Tasks::Authentication::Login::ApiBackend
- Defined in:
- lib/rake_fly/tasks/authentication/login.rb
Instance Method Summary collapse
Instance Method Details
#execute(task) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rake_fly/tasks/authentication/login.rb', line 32 def execute(task) client = Concourse::Client.new( url: task.concourse_url) token = client.for_skymarshal.create_token( username: task.username, password: task.password) rc = RubyFly::RC.load(home: task.home_directory) rc.add_or_update_target(task.target) do |target| target.api = task.concourse_url target.team = task.team target.bearer_token = token.access_token end rc.write! end |
#resolve_prerequisites(_) ⇒ Object
28 29 30 |
# File 'lib/rake_fly/tasks/authentication/login.rb', line 28 def resolve_prerequisites(_) [] end |