2015-12-13 10:34:12 +01:00
<!DOCTYPE html>
2016-04-23 02:19:03 +02:00
< html >
2015-12-13 10:34:12 +01:00
< head >
2016-04-23 02:19:03 +02:00
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
2018-08-18 17:42:18 +02:00
< title > Log In - {{ SITE_NAME }}< / title >
2016-04-23 02:19:03 +02:00
<!-- Tell the browser to be responsive to screen width -->
< meta content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name = "viewport" >
2018-06-10 15:16:28 +02:00
{% assets "css_login" -%}
< link rel = "stylesheet" href = "{{ ASSET_URL }}" >
{%- endassets %}
2016-04-23 02:19:03 +02:00
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!-- [if lt IE 9]>
< script src = "https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js" > < / script >
< script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js" > < / script >
<![endif]-->
2015-12-13 10:34:12 +01:00
< / head >
2016-04-23 02:19:03 +02:00
< body class = "hold-transition login-page" >
< div class = "login-box" >
< div class = "login-logo" >
2018-08-18 17:42:18 +02:00
< a href = "{{ url_for('index') }}" > < b > PowerDNS< / b > -Admin< / a >
2016-04-23 02:19:03 +02:00
< / div >
<!-- /.login - logo -->
< div class = "login-box-body" >
{% if error %}
2016-06-18 06:41:01 +02:00
< div class = "alert alert-danger alert-dismissible" >
< button type = "button" class = "close" data-dismiss = "alert"
aria-hidden="true">× < / button >
{{ error }}
< / div >
{% endif %}
2018-08-25 09:53:10 +02:00
< form action = "" method = "post" data-toggle = "validator" >
2018-11-21 04:24:33 +01:00
< input type = "hidden" name = "_csrf_token" value = "{{ csrf_token() }}" >
2016-04-23 02:19:03 +02:00
< div class = "form-group" >
2018-08-25 09:53:10 +02:00
< input type = "text" class = "form-control" placeholder = "Username" name = "username" data-error = "Please input your username" required { % if username % } value = "{{ username }}" { % endif % } >
< span class = "help-block with-errors" > < / span >
2016-04-23 02:19:03 +02:00
< / div >
< div class = "form-group" >
2018-08-25 09:53:10 +02:00
< input type = "password" class = "form-control" placeholder = "Password" name = "password" data-error = "Please input your password" required { % if password % } value = "{{ password }}" { % endif % } >
< span class = "help-block with-errors" > < / span >
2016-04-23 02:19:03 +02:00
< / div >
2016-06-16 10:33:05 +02:00
< div class = "form-group" >
< input type = "otptoken" class = "form-control" placeholder = "OTP Token" name = "otptoken" >
< / div >
2018-08-18 17:42:18 +02:00
{% if SETTING.get('ldap_enabled') and SETTING.get('local_db_enabled') %}
2016-06-18 06:41:01 +02:00
< div class = "form-group" >
< select class = "form-control" name = "auth_method" >
< option value = "LOCAL" > LOCAL Authentication< / option >
2018-08-18 13:41:59 +02:00
{% if SETTING.get('login_ldap_first') %}
2016-07-05 17:28:02 +02:00
< option value = "LDAP" selected = "selected" > LDAP Authentication< / option >
{% else %}
< option value = "LDAP" > LDAP Authentication< / option >
{% endif %}
< / select >
2016-08-05 10:20:41 +02:00
< / div >
2018-08-18 17:42:18 +02:00
{% elif SETTING.get('ldap_enabled') and not SETTING.get('local_db_enabled') %}
2016-06-18 06:41:01 +02:00
< div class = "form-group" >
2016-08-05 10:20:41 +02:00
< input type = "hidden" name = "auth_method" value = "LDAP" >
2016-06-18 06:41:01 +02:00
< / div >
2018-08-18 17:42:18 +02:00
{% elif SETTING.get('local_db_enabled') and not SETTING.get('ldap_enabled') %}
2016-06-18 06:41:01 +02:00
< div class = "form-group" >
2016-08-05 10:20:41 +02:00
< input type = "hidden" name = "auth_method" value = "LOCAL" >
2016-06-18 06:41:01 +02:00
< / div >
{% else %}
< div class = "form-group" >
2016-08-05 10:20:41 +02:00
< input type = "hidden" name = "auth_method" value = "LOCAL" >
2016-06-18 06:41:01 +02:00
< / div >
{% endif %}
2016-08-05 10:20:41 +02:00
2016-04-23 02:19:03 +02:00
< div class = "row" >
< div class = "col-xs-8" >
< div class = "checkbox icheck" >
< label >
2018-11-05 01:17:16 +01:00
< input type = "checkbox" name = "remember" > Remember Me
2015-12-13 10:34:12 +01:00
< / label >
2016-04-23 02:19:03 +02:00
< / div >
2015-12-13 10:34:12 +01:00
< / div >
2016-04-23 02:19:03 +02:00
<!-- /.col -->
< div class = "col-xs-4" >
2016-05-11 02:11:17 +02:00
< button type = "submit" class = "btn btn-flat btn-primary btn-block" > Sign In< / button >
2015-12-13 10:34:12 +01:00
< / div >
2016-04-23 02:19:03 +02:00
<!-- /.col -->
< / div >
2015-12-13 10:34:12 +01:00
< / form >
2019-12-05 01:52:30 +01:00
{% if SETTING.get('google_oauth_enabled') or SETTING.get('github_oauth_enabled') or SETTING.get('oidc_oauth_enabled') or SETTING.get('azure_oauth_enabled') %}
2018-08-18 17:42:18 +02:00
< div class = "social-auth-links text-center" >
< p > - OR -< / p >
2018-10-22 00:38:12 +02:00
{% 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 %}
2019-12-05 01:52:30 +01:00
{% if SETTING.get('azure_oauth_enabled') %}
2019-12-05 02:26:01 +01:00
< a href = "{{ url_for('azure_login') }}" class = "btn btn-block btn-social btn-microsoft btn-flat" > < i class = "fa fa-microsoft" > < / i > Sign in using
2019-12-05 01:52:30 +01:00
Microsoft Azure< / a >
{% endif %}
2018-08-18 17:42:18 +02:00
{% 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 >
{% endif %}
{% if SETTING.get('google_oauth_enabled') %}
< a href = "{{ url_for('google_login') }}" class = "btn btn-block btn-social btn-google btn-flat" > < i class = "fa fa-google-plus" > < / i > Sign in using
Google< / a >
{% endif %}
< / div >
2017-09-22 16:28:09 +02:00
{% endif %}
2018-08-18 17:42:18 +02:00
2017-10-31 19:21:22 +01:00
{% if saml_enabled %}
< a href = "{{ url_for('saml_login') }}" > SAML login< / a >
{% endif %}
2018-08-18 17:42:18 +02:00
{% if SETTING.get('signup_enabled') %}
2017-10-31 19:21:22 +01:00
< br >
2016-04-23 02:19:03 +02:00
< a href = "{{ url_for('register') }}" class = "text-center" > Create an account < / a >
2016-06-13 06:48:48 +02:00
{% endif %}
2016-04-23 02:19:03 +02:00
< / div >
<!-- /.login - box - body -->
< div class = "login-box-footer" >
2018-08-18 17:42:18 +02:00
< center > < p > Powered by < a href = "https://github.com/ngoduykhanh/PowerDNS-Admin" > PowerDNS-Admin< / a > < / p > < / center >
2016-04-23 02:19:03 +02:00
< / div >
2015-12-13 10:34:12 +01:00
< / div >
2016-04-23 02:19:03 +02:00
<!-- /.login - box -->
2018-06-10 15:16:28 +02:00
{% assets "js_login" -%}
< script type = "text/javascript" src = "{{ ASSET_URL }}" > < / script >
{%- endassets %}
2018-08-25 09:53:10 +02:00
{% assets "js_validation" -%}
< script type = "text/javascript" src = "{{ ASSET_URL }}" > < / script >
{%- endassets %}
2015-12-13 10:34:12 +01:00
< script >
2016-04-23 02:19:03 +02:00
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
2015-12-13 10:34:12 +01:00
< / script >
< / body >
2016-04-21 17:20:09 +02:00
< / html >