jap-core

New features

  • Add JapErrorCode enumeration class to manage exception codes and exception prompts
  • Add JapResponse class to standardize interface return content
  • Add JapTokenHelper class to manage user tokens uniformly
  • Add JapContext class to maintain jap context information
  • Add JapAuthentication class, unified management of login status information and jap context information

Modified

  • Package structure
    • Move AuthenticateConfig, JapConfig to com.fujieid.jap.core.config package
    • Move JapUtil to com.fujieid.jap.core.util package
  • delete
    • Delete JapCacheContextHolder
    • Delete JapUserStoreContextHolder
  • Code
    • Refactored AbstractJapStrategy, introduced JapContext and JapAuthentication classes
    • Refactor the JapConfig class, only retain the sso and ssoConfig attributes, and add the tokenExpireTime and cacheExpireTime attributes at the same time
    • Modify the default validity period of the cache in JapCacheConfig to 7 days
    • Modify the default content in the JapUserService interface class
    • Add the void remove key( string key) method to JapCache
    • Add errorCode and errorMessage attributes in JapException to facilitate the processing of exception information into unified format return data
    • Add the token attribute to JapUser, and the jap token will be automatically returned after login
    • In the JapStrategy interface, the return type of the authenticate method is changed to JapResponse, and the strategy methods of all modules return data in a unified format
    • Mark the redirect method with @Deprecated in the JapUtil class, and it may be deleted in the future. At the same time add the createToken method

jap-oauth2

  • Modify the authenticate method of Oauth2Strategy to return JapResponse

jap-oidc

  • Modify the authenticate method of OidcStrategy to return JapResponse

jap-simple

  • Modify the authenticate method of SimpleStrategy to return JapResponse

jap-social

  • Modify the authenticate method of SocialStrategy to return JapResponse

jap-sso

  • Modify the return value of the JapSsoHelper#login method to the jap token of the current user
  • Add JapSsoUtil
  • In the japSsoConfig class, delete the login url and logout url attributes

Other

  • Add some unit tests

项目简介

JAP 是一款开源的登录中间件,旨在为所有需要登录认证的 WEB 应用提供一套标准的技术解决方案。基于模块化设计,与业务高度解耦,使用起来非常灵活。开发者可以基于 JAP 适配绝大多数的 WEB 系统(自有系统、联邦协议)。Just auth into any app!

发行版本 8

v1.0.3

全部发行版

贡献者 10

开发语言

  • Java 99.9 %
  • Shell 0.1 %