2024-03-24 18:23:38 +00:00
|
|
|
<div class="oauth2 field {{if not (eq .type 6)}}tw-hidden{{end}}">
|
2017-03-17 05:55:04 +00:00
|
|
|
<div class="inline required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
|
2017-03-17 05:55:04 +00:00
|
|
|
<div class="ui selection type dropdown">
|
2022-03-10 22:40:43 +00:00
|
|
|
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
|
|
|
|
<div class="text">{{.oauth2_provider}}</div>
|
2020-10-31 22:15:11 +00:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2017-03-17 05:55:04 +00:00
|
|
|
<div class="menu">
|
2021-08-06 01:11:08 +00:00
|
|
|
{{range .OAuth2Providers}}
|
|
|
|
<div class="item" data-value="{{.Name}}">{{.DisplayName}}</div>
|
2017-03-17 05:55:04 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_key">{{ctx.Locale.Tr "admin.auths.oauth2_clientID"}}</label>
|
2017-03-17 05:55:04 +00:00
|
|
|
<input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}">
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_secret">{{ctx.Locale.Tr "admin.auths.oauth2_clientSecret"}}</label>
|
2017-03-17 05:55:04 +00:00
|
|
|
<input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
|
|
|
|
</div>
|
2020-12-28 02:35:55 +00:00
|
|
|
<div class="optional field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_icon_url">{{ctx.Locale.Tr "admin.auths.oauth2_icon_url"}}</label>
|
2021-04-11 03:46:37 +00:00
|
|
|
<input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}">
|
|
|
|
</div>
|
2023-03-10 06:14:43 +00:00
|
|
|
<div class="open_id_connect_auto_discovery_url required field{{if .Err_DiscoveryURL}} error{{end}}">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="open_id_connect_auto_discovery_url">{{ctx.Locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
|
2017-05-01 13:26:53 +00:00
|
|
|
<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}">
|
|
|
|
</div>
|
2021-09-10 16:37:57 +00:00
|
|
|
<div class="optional field">
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
2021-09-10 16:37:57 +00:00
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
2023-09-25 08:56:50 +00:00
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
|
2021-09-10 16:37:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-01 13:26:53 +00:00
|
|
|
|
|
|
|
<div class="oauth2_use_custom_url inline field">
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label><strong>{{ctx.Locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label>
|
2017-05-01 13:26:53 +00:00
|
|
|
<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="oauth2_use_custom_url_field oauth2_auth_url required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_auth_url">{{ctx.Locale.Tr "admin.auths.oauth2_authURL"}}</label>
|
2017-05-01 13:26:53 +00:00
|
|
|
<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{.oauth2_auth_url}}">
|
|
|
|
</div>
|
|
|
|
<div class="oauth2_use_custom_url_field oauth2_token_url required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_token_url">{{ctx.Locale.Tr "admin.auths.oauth2_tokenURL"}}</label>
|
2017-05-01 13:26:53 +00:00
|
|
|
<input id="oauth2_token_url" name="oauth2_token_url" value="{{.oauth2_token_url}}">
|
|
|
|
</div>
|
|
|
|
<div class="oauth2_use_custom_url_field oauth2_profile_url required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_profile_url">{{ctx.Locale.Tr "admin.auths.oauth2_profileURL"}}</label>
|
2017-05-01 13:26:53 +00:00
|
|
|
<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{.oauth2_profile_url}}">
|
|
|
|
</div>
|
|
|
|
<div class="oauth2_use_custom_url_field oauth2_email_url required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_email_url">{{ctx.Locale.Tr "admin.auths.oauth2_emailURL"}}</label>
|
2017-05-01 13:26:53 +00:00
|
|
|
<input id="oauth2_email_url" name="oauth2_email_url" value="{{.oauth2_email_url}}">
|
|
|
|
</div>
|
2021-08-06 01:11:08 +00:00
|
|
|
<div class="oauth2_use_custom_url_field oauth2_tenant required field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_tenant">{{ctx.Locale.Tr "admin.auths.oauth2_tenant"}}</label>
|
2021-08-06 01:11:08 +00:00
|
|
|
<input id="oauth2_tenant" name="oauth2_tenant" value="{{.oauth2_tenant}}">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{range .OAuth2Providers}}{{if .CustomURLSettings}}
|
|
|
|
<input id="{{.Name}}_customURLSettings" type="hidden" data-required="{{.CustomURLSettings.Required}}" data-available="true">
|
2023-03-27 16:05:51 +00:00
|
|
|
<input id="{{.Name}}_token_url" value="{{.CustomURLSettings.TokenURL.Value}}" data-available="{{.CustomURLSettings.TokenURL.Available}}" data-required="{{.CustomURLSettings.TokenURL.Required}}" type="hidden">
|
|
|
|
<input id="{{.Name}}_auth_url" value="{{.CustomURLSettings.AuthURL.Value}}" data-available="{{.CustomURLSettings.AuthURL.Available}}" data-required="{{.CustomURLSettings.AuthURL.Required}}" type="hidden">
|
|
|
|
<input id="{{.Name}}_profile_url" value="{{.CustomURLSettings.ProfileURL.Value}}" data-available="{{.CustomURLSettings.ProfileURL.Available}}" data-required="{{.CustomURLSettings.ProfileURL.Required}}" type="hidden">
|
|
|
|
<input id="{{.Name}}_email_url" value="{{.CustomURLSettings.EmailURL.Value}}" data-available="{{.CustomURLSettings.EmailURL.Available}}" data-required="{{.CustomURLSettings.EmailURL.Required}}" type="hidden">
|
|
|
|
<input id="{{.Name}}_tenant" value="{{.CustomURLSettings.Tenant.Value}}" data-available="{{.CustomURLSettings.Tenant.Available}}" data-required="{{.CustomURLSettings.Tenant.Required}}" type="hidden">
|
2021-08-06 01:11:08 +00:00
|
|
|
{{end}}{{end}}
|
2021-12-14 08:37:11 +00:00
|
|
|
|
|
|
|
<div class="field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_scopes">{{ctx.Locale.Tr "admin.auths.oauth2_scopes"}}</label>
|
2023-04-02 13:08:34 +00:00
|
|
|
<input id="oauth2_scopes" name="oauth2_scopes" value="{{.oauth2_scopes}}">
|
2021-12-14 08:37:11 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_required_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
|
2023-04-02 13:08:34 +00:00
|
|
|
<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{.oauth2_required_claim_name}}">
|
2023-09-25 08:56:50 +00:00
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p>
|
2021-12-14 08:37:11 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_required_claim_value">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value"}}</label>
|
2023-04-02 13:08:34 +00:00
|
|
|
<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{.oauth2_required_claim_value}}">
|
2023-09-25 08:56:50 +00:00
|
|
|
<p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p>
|
2021-12-14 08:37:11 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_group_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_group_claim_name"}}</label>
|
2021-12-14 08:37:11 +00:00
|
|
|
<input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{.oauth2_group_claim_name}}">
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_admin_group">{{ctx.Locale.Tr "admin.auths.oauth2_admin_group"}}</label>
|
2023-04-02 13:08:34 +00:00
|
|
|
<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{.oauth2_admin_group}}">
|
2021-12-14 08:37:11 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label for="oauth2_restricted_group">{{ctx.Locale.Tr "admin.auths.oauth2_restricted_group"}}</label>
|
2023-04-02 13:08:34 +00:00
|
|
|
<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{.oauth2_restricted_group}}">
|
2021-12-14 08:37:11 +00:00
|
|
|
</div>
|
2023-02-08 06:44:42 +00:00
|
|
|
<div class="field">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
|
2023-01-09 13:01:00 +00:00
|
|
|
<textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyForgejoOrganization": ["MyForgejoTeam1", "MyForgejoTeam2"]}}'>{{.oauth2_group_team_map}}</textarea>
|
2023-02-08 06:44:42 +00:00
|
|
|
</div>
|
|
|
|
<div class="ui checkbox">
|
2023-09-25 08:56:50 +00:00
|
|
|
<label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
|
2023-04-02 13:08:34 +00:00
|
|
|
<input name="oauth2_group_team_map_removal" type="checkbox" {{if .oauth2_group_team_map_removal}}checked{{end}}>
|
2023-02-08 06:44:42 +00:00
|
|
|
</div>
|
2020-10-25 18:21:49 +00:00
|
|
|
</div>
|