Github user janhoy commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/465#discussion_r223866955
--- Diff: solr/webapp/web/partials/login.html ---
@@ -0,0 +1,80 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div id="login" class="clearfix">
+
+ <div ng-show="authScheme === 'Basic'">
+ <h1>Basic Authentication</h1>
+ <div class="login-error" ng-show="statusText !== 'require
authentication' || authParamsError !== null">
+ {{statusText}}{{authParamsError}}
+ </div>
+ <div ng-show="!isLoggedIn()">
+ <p>
+ Solr requires authentication for resource {{authLocation === '/' ?
'Dashboard' : authLocation}}.<br/>
+ Please log in with your username and password for realm
{{authRealm}}.
+ </p>
+ <br/>
+ <div ng-show="error" class="alert alert-danger">{{error}}</div>
+ <form name="form" ng-submit="login()" role="form">
+ <div class="form-group">
+ <label for="username">Username</label>
+ <input type="text" name="username" id="username"
class="form-control" ng-model="username" required />
+ <span ng-show="form.username.$dirty &&
form.username.$error.required" class="help-block">Username is required</span>
+ </div>
+ <div class="form-group">
+ <label for="password">Password</label>
+ <input type="password" name="password" id="password"
class="form-control" ng-model="password" required />
+ <span ng-show="form.password.$dirty &&
form.password.$error.required" class="help-block">Password is required</span>
+ </div>
+ <br/>
+ <div class="form-actions">
+ <button type="submit" ng-disabled="form.$invalid" class="btn
btn-danger">Login</button>
+ </div>
+ </form>
+ </div>
+
+ <div ng-show="isLoggedIn()">
+ <p>
+ Logged in as user {{authLoggedinUser}}. Realm={{authRealm}}.<br/>
+ </p>
+ <br/>
+ <form name="logoutForm" ng-submit="logout()" role="form"
ng-show="isLoggedIn()">
+ <div class="form-actions">
+ <button type="submit" class="btn btn-danger">Logout</button>
+ </div>
+ </form>
+ </div>
+
+ </div>
+
--- End diff --
The idea is that future authentication schemes can add their UI here and
code hooks to `login.js` and thus have a very simple extension mechanism. While
the ideal would be a true pluggable experience for 3rd party auth to also work,
I have not attempted that in this iteration. Ideas of how to achieve that are
welcome!
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]