mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-14 12:06:06 +00:00
oidc custom claims
This commit is contained in:
@ -526,6 +526,29 @@
|
||||
<span class="help-block with-errors"></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>CLAIMS</legend>
|
||||
<div class="form-group">
|
||||
<label for="oidc_oauth_username">Username</label>
|
||||
<input type="text" class="form-control" name="oidc_oauth_username" id="oidc_oauth_username" placeholder="e.g. preferred_username" data-error="Please input Username claim" value="{{ SETTING.get('oidc_oauth_username') }}">
|
||||
<span class="help-block with-errors"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="oidc_oauth_firstname">First Name</label>
|
||||
<input type="text" class="form-control" name="oidc_oauth_firstname" id="oidc_oauth_firstname" placeholder="e.g. given_name" data-error="Please input First Name claim" value="{{ SETTING.get('oidc_oauth_firstname') }}">
|
||||
<span class="help-block with-errors"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="oidc_oauth_last_name">Last Name</label>
|
||||
<input type="text" class="form-control" name="oidc_oauth_last_name" id="oidc_oauth_last_name" placeholder="e.g. family_name" data-error="Please input Last Name claim" value="{{ SETTING.get('oidc_oauth_last_name') }}">
|
||||
<span class="help-block with-errors"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="oidc_oauth_email">Email</label>
|
||||
<input type="text" class="form-control" name="oidc_oauth_email" id="oidc_oauth_email" placeholder="e.g. email" data-error="Plesae input Email claim" value="{{ SETTING.get('oidc_oauth_email') }}">
|
||||
<span class="help-block with-errors"></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-flat btn-primary">Save</button>
|
||||
</div>
|
||||
@ -792,6 +815,10 @@
|
||||
$('#oidc_oauth_api_url').prop('required', true);
|
||||
$('#oidc_oauth_token_url').prop('required', true);
|
||||
$('#oidc_oauth_authorize_url').prop('required', true);
|
||||
$('#oidc_oauth_username').prop('required', true);
|
||||
$('#oidc_oauth_firstname').prop('required', true);
|
||||
$('#oidc_oauth_last_name').prop('required', true);
|
||||
$('#oidc_oauth_email').prop('required', true);
|
||||
} else {
|
||||
$('#oidc_oauth_key').prop('required', false);
|
||||
$('#oidc_oauth_secret').prop('required', false);
|
||||
@ -799,6 +826,10 @@
|
||||
$('#oidc_oauth_api_url').prop('required', false);
|
||||
$('#oidc_oauth_token_url').prop('required', false);
|
||||
$('#oidc_oauth_authorize_url').prop('required', false);
|
||||
$('#oidc_oauth_username').prop('required', false);
|
||||
$('#oidc_oauth_firstname').prop('required', false);
|
||||
$('#oidc_oauth_last_name').prop('required', false);
|
||||
$('#oidc_oauth_email').prop('required', false);
|
||||
}
|
||||
});
|
||||
// init validation requirement at first time page load
|
||||
@ -809,6 +840,10 @@
|
||||
$('#oidc_oauth_api_url').prop('required', true);
|
||||
$('#oidc_oauth_token_url').prop('required', true);
|
||||
$('#oidc_oauth_authorize_url').prop('required', true);
|
||||
$('#oidc_oauth_username').prop('required', true);
|
||||
$('#oidc_oauth_firstname').prop('required', true);
|
||||
$('#oidc_oauth_last_name').prop('required', true);
|
||||
$('#oidc_oauth_email').prop('required', true);
|
||||
{% endif %}
|
||||
//END: OIDC Tab JS
|
||||
|
||||
|
Reference in New Issue
Block a user