提交 995b3270 编写于 作者: 智布道's avatar 智布道 👁

💡 Update comments in source code. Fix Javadoc compilation failure

上级 5b6bbb20
......@@ -88,22 +88,19 @@ public class JapAuthentication implements Serializable {
/**
* Check whether the user is logged in. Reference method of use:
* <p>
* <p>
* <code>
* if(!JapAuthentication.checkUser(request, response).isSuccess()) { <br/>
* // Not logged in.<br/>
* }<br/>
* if(!JapAuthentication.checkUser(request, response).isSuccess()) {
* // Not logged in.
* }
* </code>
* <p>
* <p>
* Is equivalent to the following code:
* <p>
* <p>
*
* <code>
* JapUser japUser = JapAuthentication.getUser(request, response);<br/>
* if (null == japUser) {<br/>
* // Not logged in.<br/>
* }<br/>
* JapUser japUser = JapAuthentication.getUser(request, response);
* if (null == japUser) {
* // Not logged in.
* }
* </code>
*
* @param request Current request
......
......@@ -37,6 +37,7 @@ public interface JapStrategy {
* @param config Authenticate Config
* @param request The request to authenticate
* @param response The response to authenticate
* @return JapResponse
*/
default JapResponse authenticate(AuthenticateConfig config, HttpServletRequest request, HttpServletResponse response) {
return JapResponse.error(JapErrorCode.ERROR.getErrroCode(), "JapStrategy#authenticate(AuthenticateConfig, HttpServletRequest, HttpServletResponse) must be overridden by subclass");
......
/*
* Copyright (c) 2020-2040, 北京符节科技有限公司 (support@fujieid.com & https://www.fujieid.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* 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.
*/
package com.fujieid.jap.ids;
/**
* Authorization service based on rfc6749 protocol specification and OpenID Connect Core 1.0 specification
* <p>
* Features:
* <p>
* 1. Authorization Code Grant
* <p>
* 2. Implicit Grant
* <p>
* 3. Resource Owner Password Credentials Grant
* <p>
* 4. Refresh Token
* <p>
* 5. Check Token
* <p>
* 6. Proof Key for Code Exchange by OAuth Public Clients
* <p>
* 7. OpenID Connect Discovery
* <p>
* 8. OpenID Connect Front-Channel Logout
* <p>
* 9. OpenID Connect Back-Channel Logout
* <p>
* 10. ...
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @see <a href="https://tools.ietf.org/html/rfc6749" target="_blank"> The OAuth 2.0 Authorization Framework</a>
* @see <a href="https://openid.net/specs/openid-connect-core-1_0.html" target="_blank">OpenID Connect Core 1.0 incorporating errata set 1</a>
* @see <a href="https://tools.ietf.org/html/rfc7636" target="_blank">Proof Key for Code Exchange by OAuth Public Clients</a>
* @see <a href="https://openid.net/specs/openid-connect-discovery-1_0.html" target="_blank">OpenID Connect Discovery 1.0 incorporating errata set 1</a>
* @see <a href="https://openid.net/specs/openid-connect-frontchannel-1_0.html" target="_blank">OpenID Connect Front-Channel Logout 1.0</a>
* @see <a href="https://openid.net/specs/openid-connect-backchannel-1_0.html" target="_blank">OpenID Connect Back-Channel Logout 1.0</a>
* @since 1.0.0
*/
public class JapIds {
}
/*
* Copyright (c) 2020-2040, 北京符节科技有限公司 (support@fujieid.com & https://www.fujieid.com).
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* 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.
*/
/**
* Authorization service based on rfc6749 protocol specification and OpenID Connect Core 1.0 specification
* <p>
* Features:<br/>
* 1. Authorization Code Grant <br/>
* 2. Implicit Grant<br/>
* 3. Resource Owner Password Credentials Grant<br/>
* 4. Refresh Token<br/>
* 5. Check Token<br/>
* 6. Proof Key for Code Exchange by OAuth Public Clients<br/>
* 7. OpenID Connect Discovery<br/>
* 8. OpenID Connect Front-Channel Logout<br/>
* 9. OpenID Connect Back-Channel Logout<br/>
* 10. ...<br/>
* Features:
* <p>
* 1. Authorization Code Grant
* <p>
* 2. Implicit Grant
* <p>
* 3. Resource Owner Password Credentials Grant
* <p>
* 4. Refresh Token
* <p>
* 5. Check Token
* <p>
* 6. Proof Key for Code Exchange by OAuth Public Clients
* <p>
* 7. OpenID Connect Discovery
* <p>
* 8. OpenID Connect Front-Channel Logout
* <p>
* 9. OpenID Connect Back-Channel Logout
* <p>
* 10. ...
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
......
......@@ -40,6 +40,7 @@ public class PkceHelper {
* Create the parameters required by PKCE
*
* @param oAuthConfig oauth config
* @return Map
* @see <a href="https://tools.ietf.org/html/rfc7636#section-1.1" target="_blank">1.1. Protocol Flow</a>
* @see <a href="https://tools.ietf.org/html/rfc7636#section-4.1" target="_blank">4.1. Client Creates a Code Verifier</a>
* @see <a href="https://tools.ietf.org/html/rfc7636#section-4.2" target="_blank">4.2. Client Creates the Code Challenge</a>
......
......@@ -43,6 +43,10 @@ public class RememberMeUtils {
/**
* Credential encryption algorithm: MD5 encryption
*
* @param request request
* @param simpleConfig simpleConfig
* @return boolean
*/
public static boolean enableRememberMe(HttpServletRequest request, SimpleConfig simpleConfig) {
return BooleanUtil.toBoolean(request.getParameter(simpleConfig.getRememberMeField()));
......
......@@ -41,6 +41,7 @@ public class JapSsoHelper {
* @param japSsoConfig sso config
* @param request current request
* @param response current response
* @return String
*/
public static String login(Object userId, String username, JapSsoConfig japSsoConfig, HttpServletRequest request, HttpServletResponse response) {
// Initialize Jap SSO config to prevent NPE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册