-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature #42: add support to configure the authenticate methods
- Add configuration step to select the authenticate methods which are enabled - Add configuration method to generate the configuration according to what auth method is allowed - Update the labels and navigation configuration
- Loading branch information
Showing
12 changed files
with
363 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- Response sent after the Auth step | ||
- Copyright (C) 2023 Stephane Carrez | ||
- Written by Stephane Carrez (Stephane.Carrez@gmail.com) | ||
- | ||
- Licensed 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. | ||
--> | ||
<f:view contentType="application/json" | ||
xmlns:c="http://java.sun.com/jstl/core" | ||
xmlns:f="http://java.sun.com/jsf/core"> | ||
[ | ||
{ "action": "removeClass", "id": "#setup-steps", "data": "setup-auth" }, | ||
<c:choose> | ||
<c:when test="#{setup.app_login_openid}"> | ||
{ "action": "get", "url": "#{contextPath}/setup/forms/oauth.html" }, | ||
{ "action": "addClass", "id": "#setup-steps", "data": "setup-oauth" } | ||
</c:when> | ||
<c:otherwise> | ||
{ "action": "get", "url": "#{contextPath}/setup/forms/finish.html" }, | ||
{ "action": "addClass", "id": "#setup-steps", "data": "setup-finish" } | ||
</c:otherwise> | ||
</c:choose> | ||
] | ||
</f:view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<!-- Form to configure the authenticate methods | ||
- Copyright (C) 2023 Stephane Carrez | ||
- Written by Stephane Carrez (Stephane.Carrez@gmail.com) | ||
- | ||
- Licensed 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. | ||
--> | ||
<f:view contentType="text/html; charset=UTF-8" | ||
xmlns:f="http://java.sun.com/jsf/core" | ||
xmlns:w="http://code.google.com/p/ada-asf/widget" | ||
xmlns:h="http://java.sun.com/jsf/html"> | ||
<h:form id='setup-auth'> | ||
<h2> | ||
#{setupMsg.setup_auth_message} | ||
</h2> | ||
<div> | ||
<p class="setup-description"> | ||
You can choose whether users can register themselves through the web interface. | ||
If you disable the user registration, you can register manually by using the | ||
<i>user</i> command. | ||
</p> | ||
<dl class="setup-checkbox"> | ||
<dt><label for='login-register'>Allow users to register</label> <h:message for='login-register'/></dt> | ||
<dd> | ||
<h:selectBooleanCheckbox id="login-register" value="#{setup.app_login_register}"/> | ||
</dd> | ||
</dl> | ||
</div> | ||
<h2> | ||
#{setupMsg.setup_auth_methods} | ||
</h2> | ||
<div> | ||
<p class="setup-description"> | ||
Choose the authenticate methods which are allowed for users to login. | ||
</p> | ||
<dl class="setup-checkbox"> | ||
|
||
<dt><label for='login-email'>Email login</label> <h:message for='login-email'/></dt> | ||
<dd> | ||
<h:selectBooleanCheckbox id="login-email" value="#{setup.app_login_email}"/> | ||
</dd> | ||
|
||
<dt><label for='login-google'>Google+ login</label> <h:message for='login-google'/></dt> | ||
<dd> | ||
<h:selectBooleanCheckbox id="login-google" value="#{setup.app_login_google}"/> | ||
</dd> | ||
|
||
<dt><label for='login-github'>GitHub login</label> <h:message for='login-github'/></dt> | ||
<dd> | ||
<h:selectBooleanCheckbox id="login-github" value="#{setup.app_login_github}"/> | ||
</dd> | ||
|
||
<dt><label for='login-gitlab'>GitLab login</label> <h:message for='login-gitlab'/></dt> | ||
<dd> | ||
<h:selectBooleanCheckbox id="login-gitlab" value="#{setup.app_login_gitlab}"/> | ||
</dd> | ||
|
||
<dt><label for='login-facebook'>Facebook login</label> <h:message for='login-facebook'/></dt> | ||
<dd> | ||
<h:selectBooleanCheckbox id="login-facebook" value="#{setup.app_login_facebook}"/> | ||
</dd> | ||
|
||
<dt><label for='login-facebook'>Twitter login</label> <h:message for='login-twitter'/></dt> | ||
<dd> | ||
<h:selectBooleanCheckbox id="login-twitter" value="#{setup.app_login_twitter}"/> | ||
</dd> | ||
</dl> | ||
|
||
</div> | ||
<ul class='awa-buttons'> | ||
<li class="previous"> | ||
<input type="submit" value="#{setupMsg.setup_previous_label}" | ||
class="ui-button ui-state-default ui-corner-all" | ||
onclick="return previous_step('settings');"/> | ||
</li> | ||
<li> | ||
<h:commandButton id='setup-auth-button' value='#{setupMsg.setup_next_label}' | ||
styleClass="ui-button ui-state-default ui-corner-all" | ||
action="#{setup.configure_authentication}" | ||
title="#{setupMsg.setup_next_tooltip}"/> | ||
</li> | ||
</ul> | ||
</h:form> | ||
</f:view> |
Oops, something went wrong.