Skip to content

Commit

Permalink
[auth]: uniformed credential page for ega login and AAI login
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjiangshu committed Feb 20, 2025
1 parent 47fe7d2 commit 1910e36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions sda/cmd/auth/frontend/templates/ega.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@
Welcome, {{.User}}!
</p>
{{if .Token}}
<p class="text-center">
Your access token is:
</p>
<pre class="border border-secondary rounded py-2 px-3 my-4" id="logintext">{{.Token}}</pre>
{{end}}
{{if .ExpDate}}
<p class="text-center">
Your access token expires (UTC):
</p>
<pre class="text-center" id="logintext">{{.ExpDate}}</pre>
<p class="text-center">
For <strong>uploading</strong> to the Inbox, your access token {{if .ExpDate}}(expires at {{.ExpDate}} UTC){{end}} is:
</p>
<pre class="border border-secondary rounded py-2 px-3 my-4" id="logintext">{{.Token}}</pre>
{{end}}
<a href="/ega/s3conf" class="btn btn-primary btn-block">Download inbox s3cmd credentials</a>
<a href="/ega/s3conf" class="btn btn-primary btn-block mb-5">Download credentials to upload to the Inbox</a>
<a href="/" class="btn btn-primary btn-block">Continue</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion sda/cmd/auth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (auth AuthHandler) getEGALogin(ctx iris.Context) {

// getEGAConf returns an s3config file for an oidc login
func (auth AuthHandler) getEGAConf(ctx iris.Context) {
auth.getS3Config(ctx, "ega", "s3cmd.conf")
auth.getS3Config(ctx, "ega", "s3cmd-inbox.conf")
}

// getOIDC redirects to the oidc page defined in auth.Config
Expand Down

0 comments on commit 1910e36

Please sign in to comment.