forked from cesanta/docker_auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added Gitlab Authentication method (cesanta#319)
Co-authored-by: Aleksei Apaseev <[email protected]> Co-authored-by: techknowlogick <[email protected]>
- Loading branch information
1 parent
5101eed
commit 9aa1b21
Showing
8 changed files
with
582 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!doctype html> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Docker Registry Authentication</title> | ||
<style> | ||
body { | ||
color: #000; | ||
background: #fff; | ||
font-family: sans-serif; | ||
padding: 4em 4em; | ||
} | ||
a { color: #000; } | ||
#panel p { text-align:center; } | ||
#login-with-gitlab code { | ||
font-size: 1.4em; | ||
} | ||
#revoke-access { | ||
color: #666; | ||
font-size: 0.8em; | ||
text-decoration: none; | ||
} | ||
#revoke-access:hover { | ||
text-decoration: underline; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="panel"> | ||
<p> | ||
<a id="gitlab-icon" href="{{.GitlabWebUri}}/oauth/authorize?client_id={{.ClientId}}&redirect_uri={{.RedirectUri}}&response_type=code&state=&scope=read_user"> | ||
<img src="https://about.gitlab.com/images/press/logo/png/gitlab-logo-gray-stacked-rgb.png" width="155px" height="155px"></img> | ||
</a> | ||
</p> | ||
<p> | ||
<a id="revoke-access" href="{{.GitlabWebUri}}/-/profile/applications">Revoke access</a> | ||
</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!doctype html> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Docker Registry Authentication</title> | ||
<style> | ||
body { | ||
color: #000; | ||
background: #fff; | ||
font-family: sans-serif; | ||
padding: 4em 4em; | ||
} | ||
hr { | ||
border: none; | ||
border-top: 1px solid #ccc; | ||
} | ||
.message code { | ||
font-size: 1.4em; | ||
background: #ccc; | ||
border-radius: 0.5em; | ||
padding: 0.25em 0.5em; | ||
margin: 0 0.25em 0 0.25em; | ||
} | ||
.command { | ||
font-size: 2em; | ||
line-height: 2em; | ||
color: #222; | ||
background: #fafafa; | ||
padding: 1em 1em 1.2em 1em; | ||
margin: 1em 0; | ||
border-radius: 0.5em; | ||
text-shadow: 0px 1px 0px #fff; | ||
} | ||
.command span { | ||
user-select: none; | ||
-moz-user-select: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p class="message"> | ||
You are successfully authenticated to the Docker Registry. | ||
Use the following username and password to login into the registry: | ||
</p> | ||
<hr> | ||
<pre class="command"><span>$ </span>docker login -u {{.Username}} -p {{.Password}} {{if .RegistryUrl}}{{.RegistryUrl}}{{else}}docker.example.com{{end}}</pre> | ||
</body> | ||
</html> |
Oops, something went wrong.