File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,13 +174,15 @@ def github(github_token)
174174 # @param [String] pkcs7
175175 # pkcs7 returned by the instance identity document (with line breaks removed)
176176 # @param [String] nonce optional
177+ # @param [String] route optional
177178 #
178179 # @return [Secret]
179- def aws_ec2 ( role , pkcs7 , nonce = nil )
180+ def aws_ec2 ( role , pkcs7 , nonce = nil , route = nil )
181+ route ||= '/v1/auth/aws-ec2/login'
180182 payload = { role : role , pkcs7 : pkcs7 }
181183 # Set a custom nonce if client is providing one
182184 payload [ :nonce ] = nonce if nonce
183- json = client . post ( '/v1/auth/aws-ec2/login' , JSON . fast_generate ( payload ) )
185+ json = client . post ( route , JSON . fast_generate ( payload ) )
184186 secret = Secret . decode ( json )
185187 client . token = secret . auth . client_token
186188 return secret
You can’t perform that action at this time.
0 commit comments