X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7653054635e3f4f84da3f2b6862cd2c02fbe3fd4..d4d5dbe0e5b30dd6d4fd0022c6b9100a06afab46:/apps/workbench/app/views/users/_current_token.html.erb diff --git a/apps/workbench/app/views/users/_current_token.html.erb b/apps/workbench/app/views/users/_current_token.html.erb index 6b1ec33a26..543d4ebae4 100644 --- a/apps/workbench/app/views/users/_current_token.html.erb +++ b/apps/workbench/app/views/users/_current_token.html.erb @@ -14,6 +14,15 @@ SPDX-License-Identifier: AGPL-3.0 %>

The Arvados API token is a secret key that enables the Arvados SDKs to access Arvados with the proper permissions. For more information see <%= link_to raw('Getting an API token'), "#{Rails.configuration.Workbench.ArvadosDocsite}/user/reference/api-tokens.html", target: "_blank"%>.

Paste the following lines at a shell prompt to set up the necessary environment for Arvados SDKs to authenticate to your <%= current_user.username %> account.

+<% + wb2_url = nil + if Rails.configuration.Services.Workbench2.ExternalURL != URI("") + wb2_url = Rails.configuration.Services.Workbench2.ExternalURL.to_s + wb2_url += '/' if wb2_url[-1] != '/' + wb2_url += "token?api_token=" + Thread.current[:arvados_api_token] + end +%> +

IMPORTANT: This token will expire when logged out. If you need a token for a long running process, it is recommended to <% if wb2_url %>get a token from Workbench2's Get API token dialog. <% else %> create a new token using the CLI tools.<% end %>

 HISTIGNORE=$HISTIGNORE:'export ARVADOS_API_TOKEN=*'