mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-14 20:16:05 +00:00
Azure OAuth documentation and html templates
This commit is contained in:
@ -676,6 +676,40 @@
|
||||
{% endif %}
|
||||
// END: Github tab js
|
||||
|
||||
// START: Azure tab js
|
||||
// update validation requirement when checkbox is togged
|
||||
$('#azure_oauth_enabled').iCheck({
|
||||
checkboxClass : 'icheckbox_square-blue',
|
||||
increaseArea : '20%'
|
||||
}).on('ifChanged', function(e) {
|
||||
var is_enabled = e.currentTarget.checked;
|
||||
if (is_enabled){
|
||||
$('#azure_oauth_key').prop('required', true);
|
||||
$('#azure_oauth_secret').prop('required', true);
|
||||
$('#azure_oauth_scope').prop('required', true);
|
||||
$('#azure_oauth_api_url').prop('required', true);
|
||||
$('#azure_oauth_token_url').prop('required', true);
|
||||
$('#azure_oauth_authorize_url').prop('required', true);
|
||||
} else {
|
||||
$('#azure_oauth_key').prop('required', false);
|
||||
$('#azure_oauth_secret').prop('required', false);
|
||||
$('#azure_oauth_scope').prop('required', false);
|
||||
$('#azure_oauth_api_url').prop('required', false);
|
||||
$('#azure_oauth_token_url').prop('required', false);
|
||||
$('#azure_oauth_authorize_url').prop('required', false);
|
||||
}
|
||||
});
|
||||
// init validation requirement at first time page load
|
||||
{% if SETTING.get('azure_oauth_enabled') %}
|
||||
$('#azure_oauth_key').prop('required', true);
|
||||
$('#azure_oauth_secret').prop('required', true);
|
||||
$('#azure_oauth_scope').prop('required', true);
|
||||
$('#azure_oauth_api_url').prop('required', true);
|
||||
$('#azure_oauth_token_url').prop('required', true);
|
||||
$('#azure_oauth_authorize_url').prop('required', true);
|
||||
{% endif %}
|
||||
// END: Azure tab js
|
||||
|
||||
// START: OIDC tab js
|
||||
$('#oidc_oauth_enabled').iCheck({
|
||||
checkboxClass : 'icheckbox_square-blue',
|
||||
|
@ -84,13 +84,17 @@
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
{% if SETTING.get('google_oauth_enabled') or SETTING.get('github_oauth_enabled') or SETTING.get('oidc_oauth_enabled') %}
|
||||
{% if SETTING.get('google_oauth_enabled') or SETTING.get('github_oauth_enabled') or SETTING.get('oidc_oauth_enabled') or SETTING.get('azure_oauth_enabled') %}
|
||||
<div class="social-auth-links text-center">
|
||||
<p>- OR -</p>
|
||||
{% if SETTING.get('oidc_oauth_enabled') %}
|
||||
<a href="{{ url_for('oidc_login') }}" class="btn btn-block btn-social btn-openid btn-flat"><i class="fa fa-openid"></i> Sign in using
|
||||
OpenID Connect</a>
|
||||
{% endif %}
|
||||
{% if SETTING.get('azure_oauth_enabled') %}
|
||||
<a href="{{ url_for('azure_login') }}" class="btn btn-block btn-social btn-github btn-flat"><i class="fa fa-azure"></i> Sign in using
|
||||
Microsoft Azure</a>
|
||||
{% endif %}
|
||||
{% if SETTING.get('github_oauth_enabled') %}
|
||||
<a href="{{ url_for('github_login') }}" class="btn btn-block btn-social btn-github btn-flat"><i class="fa fa-github"></i> Sign in using
|
||||
Github</a>
|
||||
|
Reference in New Issue
Block a user