Add support for Dex to Quay
Fixes #306 - Adds support for Dex as an OAuth external login provider - Adds support for OIDC in general - Extract out external logins on the JS side into a service - Add a feature flag for disabling direct login - Add support for directing to the single external login service - Does *not* yet support the config in the superuser tool
This commit is contained in:
parent
46f150cafb
commit
c0286d1ac3
27 changed files with 533 additions and 176 deletions
|
@ -9,52 +9,35 @@
|
|||
<thead>
|
||||
<td>Provider</td>
|
||||
<td>Account Status</td>
|
||||
<td>Attach/Detach</td>
|
||||
<td quay-show="Features.DIRECT_LOGIN">Attach/Detach</td>
|
||||
</thead>
|
||||
|
||||
<!-- GitHub Login -->
|
||||
<tr class="external-auth-provider" ng-show="Features.GITHUB_LOGIN">
|
||||
<td>
|
||||
<i class="fa fa-github"></i> GitHub <span ng-if="KeyService.isEnterprise('github')">Enterprise</span>
|
||||
<tr class="external-auth-provider" ng-repeat="provider in EXTERNAL_LOGINS">
|
||||
<td class="external-auth-provider-title">
|
||||
<img ng-src="{{ provider.icon().url }}" ng-if="provider.icon().url">
|
||||
<i class="fa" ng-class="provider.icon().icon" ng-if="provider.icon().icon"></i>
|
||||
{{ provider.title() }}
|
||||
</td>
|
||||
<td>
|
||||
<span ng-if="hasGithubLogin">
|
||||
Attached to GitHub <span ng-if="KeyService.isEnterprise('github')">Enterprise</span> account <b><a href="{{githubEndpoint}}{{githubLogin}}" target="_blank">{{githubLogin}}</a></b>
|
||||
<span ng-if="externalLoginInfo[provider.id]">
|
||||
Attached to {{ provider.title() }} account
|
||||
<b ng-if="provider.hasUserInfo">
|
||||
<a ng-href="{{ provider.getUserInfo(externalLoginInfo[provider.id]).endpoint }}" target="_blank">
|
||||
{{ provider.getUserInfo(externalLoginInfo[provider.id]).username }}
|
||||
</a>
|
||||
</b>
|
||||
</span>
|
||||
|
||||
<span class="empty" ng-if="!hasGithubLogin">
|
||||
(Not attached to GitHub<span ng-if="KeyService.isEnterprise('github')"> Enterprise</span>)
|
||||
<span class="empty" ng-if="!externalLoginInfo[provider.id]">
|
||||
Not attached to {{ provider.title() }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="external-login-button" provider="github" action="attach" is-link="true"
|
||||
ng-if="!hasGithubLogin"></span>
|
||||
<a href="javascript:void(0)" ng-if="hasGithubLogin"
|
||||
ng-click="detachExternalLogin('github')">Detach Account</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Google Login -->
|
||||
<tr class="external-auth-provider" ng-show="Features.GOOGLE_LOGIN">
|
||||
<td>
|
||||
<i class="fa fa-google"></i> Google Account
|
||||
</td>
|
||||
<td>
|
||||
<span ng-if="hasGoogleLogin">
|
||||
Attached to Google account <b>{{ googleLogin }}</b>
|
||||
</span>
|
||||
|
||||
<span class="empty" ng-if="!hasGoogleLogin">
|
||||
(Not attached to a Google account)
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="external-login-button" provider="google" action="attach" is-link="true"
|
||||
ng-if="!hasGoogleLogin"></span>
|
||||
<a href="javascript:void(0)" ng-if="hasGoogleLogin"
|
||||
ng-click="detachExternalLogin('google')">Detach Account</a>
|
||||
<span class="external-login-button" provider="{{ provider.id }}" action="attach" is-link="true"
|
||||
ng-if="!externalLoginInfo[provider.id]"></span>
|
||||
<a href="javascript:void(0)" ng-if="externalLoginInfo[provider.id] && Features.DIRECT_LOGIN"
|
||||
ng-click="detachExternalLogin(provider.id)">Detach Account</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
Reference in a new issue