JAP is an open source authentication middleware, it is highly decoupled from business code and has good modularity and flexiblity. Developers could integrate JAP into web applications effortlessly.

Overview

Just auth into any app

star star

开源地址: Gitee | Github

官方网站(Wiki): https://justauth.plus

🎨 JAP 是什么?

JAP 是一款开源的登录中间件,基于模块化设计,并且与业务高度解耦,使用起来非常灵活,开发者可以毫不费力地将 JAP 集成到任何 web 应用程序中,就像集成 JustAuth 一样简单方便。

JAP 要做的是为所有需要登录认证的应用提供一套标准的解决方案,集成所有 APP。方便开发者无缝对接任何第三方应用或者自有系统。

  • JAP 口号:Just auth into any app!
  • JAP 目标:让身份链接无处可藏
  • JAP 价值:方便开发者无缝对接任何第三方应用或者自有系统,提高开发效率,减少代码维护成本
  • JAP 愿景:以开源的方式,受惠于开源社区,赋能于开发者。使之成为开发者生态内必不可少的“基础设施”,以期形成新的技术标准。

ps:我们要让开发者可以基于 JAP 开发出自己的 IAM 或者 IDaaS 系统。

JAP 有什么特点?

  • 单点登录:一处登录,处处通行
  • 开箱即用:API 设计趋近于白话,类似并参考 JustAuth
  • 多平台:
    • 国内外数十家第三方平台(基于 JustAuth)
    • OAuth(OIDC) 协议的平台,内置国内外常见平台
    • SAML 协议的平台,内置国内外常见平台
  • 业务解耦:JAP 不深入具体的业务,只将授权认证方面的功能抽象出一套标准的组件,方便任意系统快速对接
  • 模块化:JAP 基于模块开发,基本做到,用哪种引哪种
  • 统一标准:一切内置实现或者自定义的实现,都基于标准的策略
  • 多语言支持计划:后期将会支持以下语言版本:Java、Python、Go、Node 等

💥 适用于哪些场景?

  • 新项目立项,你们需要研发一套独立的、统一的、包含登录、认证的系统
  • 现有登录模块为自研,但是新一轮的技术规划中,你们想将登录认证模块重构,以更加灵活的架构适应后面的新需求,比如:集成 MFA 登录、集成 OAuth 登录等
  • 你们的项目太多,每个项目都需要登录认证模块,想解决这种重复劳动的问题
  • 从长远方面考虑,公司或组织或个人需要一套标准的、灵活的、功能全面的登录认证功能
  • 你们不想将研发成本放到登录认证这种必须但想做完善又需要花费大量时间成本、人力成本的事情上,希望有一个中间件可以完美集成登录认证功能,使研发人员有更多的时间和精力投入到业务开发中,提高研发产能和研发效率
  • 你们除了需要对接标准的身份提供商外,还有一些非标准的身份提供商,需要投入研发人员单独定制开发
  • 你们企业中用到的开发语言较多,比如:Java、Python、Node等,每种语言对应的系统,都要使用不同语言实现相同的登录认证功能
  • 你们需要研发一个支持 OAuth 登录的 Web 应用程序
  • 你们想让自己的系统支持对外提供 OAuth 服务
  • 你们需要研发一个支持 SAML 登录的 Web 应用程序,但又苦于 SAML 那庞大而繁琐的业务流程和配置
  • 你们想研发一个支持 LDAP 登录的程序,但又不知道如何入手
  • ...

JAP 常见问题有哪些?

JAP 不支持具体的业务操作吗?

JAP 针对用户、应用等业务数据,只提供标准的业务接口,不提供数据库层面的支持。JAP 要做的是为广大开发者提供一套技术标准,既然是标准,那就不能依赖于任何和具体业务相关的逻辑。不管你们的系统是用的 MySQL、Oracle、SQLlite、Redis、MongoDB 还是其他的,JAP 通通不关心。JAP 对外提供标准接口,业务端只需要按需实现 JAP 的接口即可,这种设计能在最大程度上增加它的灵活性,使它不受限于某一具体的数据库实现方案。

JAP 可以用到企业级项目吗?

当然,JAP 的价值就在于:方便开发者无缝对接任何第三方应用或者自有系统,提高开发效率,减少代码维护成本。所以对于企业来说,这是一个降本增效的功能。JAP 基于模块化开发,并且不侵入业务系统,可以十分方便的集成到企业内部各个系统或者统一的登录认证网关中。

JAP 可以商用吗?

JAP 基于 LGPL 3.0 协议。商用分为以下两种情况:

  • LGPL 允许商业软件通过类库引用(link)方式使用而不需要开源商业软件的代码。这使得采用 LGPL 协议的开源代码可以被商业软件作为类库引用并发布和销售
  • 如果修改 LGPL 协议的代码或者衍生,则所有修改的代码,涉及修改部分的额外代码和衍生的代码都必须采用 LGPL 协议。因此 LGPL 协议的开源代码不适合通过修改和衍生的方式做二次开发的商业软件采用

🚀 开源推荐

🏘️ 加入社群

输入图片说明

🏘️ 加入开发者组织

参考文章

👪 贡献者列表

Giteye chart

💹 关注统计

Gitee

Github

Product Hunt

JustAuthPlus - Just auth into any app | Product Hunt
Comments
  • 关于SocialStrategy的构造器

    关于SocialStrategy的构造器

    SocialStrategy其中两个构造器:

    public SocialStrategy(JapUserService japUserService, JapConfig japConfig, JapCache japCache) {
            super(japUserService, japConfig, japCache);
    }
    
    public SocialStrategy(JapUserService japUserService, JapConfig japConfig, AuthStateCache authStateCache) {
            this(japUserService, japConfig);
            this.authStateCache = authStateCache;
    }
    

    如果调用第一个构造器,可以传入自己的JapCache实现,但此时似乎就只能使用AuthStateCache的默认实现了。同理,调用第二个构造器也是一样。如果我想同时采用JapCacheAuthStateCache的自己的实现,似乎不是那么友好。

    能否对此提供支持?或者jap框架这么设计是特意有所考虑,防止出现一些错误。

    bug 
    opened by Vector6662 3
  • `SessionJapUserStore`的`save()`方法参数问题

    `SessionJapUserStore`的`save()`方法参数问题

    SessionJapUserStore的save()方法我认为似乎有一些问题。方法体中的这行代码:

    JapTokenHelper.saveUserToken(japUser.getUserId(), token);
    

    需要japUser实例的Id作为参数,但有时japUser并没有设置Id属性,比如实现japuserservice接口中模拟的数据就没有模拟其中的Id属性。 没有设置Id更多是开发者的疏忽,但是目前的报错似乎不是很友好。

    bug 
    opened by Vector6662 3
  • 统一 SimapleConfig 时间字段类型,修复 Social 文案提示错误。

    统一 SimapleConfig 时间字段类型,修复 Social 文案提示错误。

    Notes: Please make sure that the code you contributed does not have protocol conflicts/incompatibility

    You can check your code from the following two aspects:

    If your code or newly introduced dependencies in the code are not compatible with LGPL-3.0, we may not merge your code.

    What this PR does / why we need it:

    同步 SimapleConfig 类与 JapConfig 中时间字段使用一致。

    Jap 整个系统中时间类型应该统一,有些地方 Integer 有些地方 Lone 用户需要转换。

    Pre-submission checklist:

    • [x] Did you explain what problem does this PR solve?
    • [ ] What new features have been added?
    • [ ] Have you added corresponding test cases?
    • [x] Have you modified the corresponding document?
    • [ ] Is this PR backward compatible?
    opened by StringKe 1
  • bug: checkAuthenticateConfig方法逻辑

    bug: checkAuthenticateConfig方法逻辑

    com.fujieid.jap.core.strategy.AbstractJapStrategy类中的方法checkAuthenticateConfig似乎存在一些逻辑问题。

    protected void checkAuthenticateConfig(AuthenticateConfig sourceConfig, Class<?> targetConfigClazz) throws JapException {
            if (ObjectUtil.isNull(sourceConfig)) {
                throw new JapException(JapErrorCode.MISS_AUTHENTICATE_CONFIG);
            }
            if (!ClassUtil.isAssignable(sourceConfig.getClass(), targetConfigClazz)) {
                throw new JapException("Unsupported parameter type, please use " + ClassUtil.getClassName(targetConfigClazz, true) + ", a subclass of AuthenticateConfig");
            }
        }
    

    我认为这里的逻辑应该是检查sourceConfig所属的类应该是targetConfigClazz本身或是子类。在我的代码中sourceConfig实参为SimpleProperties它是SimpleConfig的子类。所以这里调用ClassUtil.isAssignable(...)似乎两个参数的位置写反了,因为我描述的这个情况正好满足ClassUtil.isAssignable(...)方法说明上的第二点:2、目标类型是原类型的父类image

    同时我也进行了测试:

    image

    当源和目标交换一下位置后才是正确的: image

    bug 
    opened by Vector6662 1
  • 修改 JapUserService 接口中的 createAndGetHttpApiUser  方法名使其更符合语义

    修改 JapUserService 接口中的 createAndGetHttpApiUser 方法名使其更符合语义

    【必填】该 PR 解决了什么问题/新加了什么特性? 将修改 JapUserService 接口中的 createAndGetHttpApiUser 方法名更改为 saveHttpAuthedJapUser 使其更符合语义。

    【必填】是否自测完成并提供了相关单元测试代码? 完成了自测,没有提供单元测试。

    opened by Mvbbb 0
  • feat: 希望后续可以支持CAS

    feat: 希望后续可以支持CAS

    Why did you add this feature?

    CAS是Central Authentication Service的缩写,中央认证服务,一种独立开放指令协议。

    1、开源的企业级单点登录解决方案。 2、CAS Server 为需要独立部署的 Web 应用。 3、CAS Client 支持非常多的客户端(这里指单点登录系统中的各个 Web 应用),包括 Java, .Net, PHP, Perl, Apache, uPortal, Ruby 等语言编写的各种web应用。 4、CAS属于Apache 2.0许可证,允许代码修改,再发布(作为开源或商业软件)。

    opened by qingshanking 0
  • ⬆️ Bump hutool-http from 5.7.14 to 5.7.19

    ⬆️ Bump hutool-http from 5.7.14 to 5.7.19

    Bumps hutool-http from 5.7.14 to 5.7.19.

    Release notes

    Sourced from hutool-http's releases.

    5.7.19 (2022-01-07)

    🐣新特性

    • 【db 】 优化Condition参数拆分(pr#2046@Github)
    • 【core 】 优化ArrayUtil.isAllEmpty性能(pr#2045@Github)
    • 【core 】 CharSequenceUtil.replace方法支持增补字符(pr#2041@Github)
    • 【extra 】 增加SshjSftp(pr#493@Gitee)
    • 【core 】 增加CheckedUtil(pr#491@Gitee)
    • 【extra 】 增加Sftp.isDir中的抛异常判断条件(issues#I4P9ED@Gitee)

    🐞Bug修复

    • 【http 】 HttpUtil重定向次数失效问题(issue#I4O28Q@Gitee)
    • 【core 】 修复UrlPath空白path多/问题(issue#I49KAL@Gitee)
    • 【core 】 修复ServletUtil写出文件时未添加双引号导致逗号等特殊符号引起的问题(issue#I4P1BF@Gitee)
    • 【core 】 NumberUtil增加equals重载解决long传入判断问题(pr#2064@Github)
    • 【core 】 修复CsvParser行号有误问题(pr#2065@Github)
    • 【http 】 修复HttpRequest.of无法自动添加http前缀问题(issue#I4PEYL@Gitee)
    • 【core 】 修复 CharSequenceUtil.brief(str, maxLength) 方法字符串越界问题,以及 maxLength 部分值时结果与预期不符的问题(pr#2068@Github)
    • 【core 】 修复NamingCase中转换下划线字母+数字转换问题(issue#2070@Github)
    • 【core 】 修复split空判断不一致问题(pr#496@Gitee)
    • 【crypto 】 修复SM2.getDHex()前导0丢失,然后导致获取密钥错误(pr#2073@Github)
    • 【core 】 修复关于Calculator.conversion()方法EmptyStackException的bug(pr#2076@Github)
    • 【core 】 修复StrUtil.subBetweenAll循环bug(issue#I4PT3M@Gitee)

    5.7.18 (2021-12-25)

    🐣新特性

    • 【core 】 新增CollStreamUtil.groupKeyValue(pr#479@Gitee)
    • 【core 】 新增DatePattern.createFormatter(pr#483@Gitee)
    • 【core 】 增加IdUtil.getSnowflakeNextId(pr#485@Gitee)
    • 【log 】 log4j2的编译依赖改为api,core为test依赖(pr#2019@Github)
    • 【core 】 Img.scale缩小默认使用平滑模式,增加scale方法重载可选模式(issue#I4MY6X@Gitee)
    • 【core 】 excel添加写入图片的方法(pr#486@Gitee)
    • 【core 】 增加CollStreamUtil.groupBy(pr#484@Gitee)
    • 【core 】 增加CollUtil.setValueByMap(pr#482@Gitee)
    • 【core 】 LocalDateTimeUtil增加endOfDay重载(issue#2025@Github)
    • 【core 】 IoCopier增加setFlushEveryBuffer方法(issue#2022@Github)

    🐞Bug修复

    • 【core 】 LineReadWatcher#onModify文件清空判断问题(issue#2013@Github)
    • 【core 】 修复4位bytes转换float问题(issue#I4M0E4@Gitee)
    • 【core 】 修复CharSequenceUtil.replace问题(issue#I4M16G@Gitee)
    • 【json 】 修复JSONObject 初始化大小值未被使用问题(issue#2016@Github)
    • 【core 】 修复StrUtil.startWith都为null返回错误问题(issue#I4MV7Q@Gitee)
    • 【core 】 修复PasswdStrength检测问题(issue#I4N48X@Gitee)
    • 【core 】 修复UserAgentUtil解析EdgA无法识别问题(issue#I4MCBP@Gitee)
    • 【extra 】 修复Archiver路径前带/问题(issue#I4NS0F@Gitee)
    • 【extra 】 修复getMainColor方法中参数rgbFilters无效问题(pr#2034@Github)
    • 【core 】 修复ChineseDate无法区分闰月问题(issue#I4NQQW@Gitee)
    • 【core 】 修复BeanDesc大小写误判问题(issue#2009@Github)

    ... (truncated)

    Changelog

    Sourced from hutool-http's changelog.

    5.7.19 (2022-01-07)

    🐣新特性

    • 【db 】 优化Condition参数拆分(pr#2046@Github)
    • 【core 】 优化ArrayUtil.isAllEmpty性能(pr#2045@Github)
    • 【core 】 CharSequenceUtil.replace方法支持增补字符(pr#2041@Github)
    • 【extra 】 增加SshjSftp(pr#493@Gitee)
    • 【core 】 增加CheckedUtil(pr#491@Gitee)
    • 【extra 】 增加Sftp.isDir中的抛异常判断条件(issues#I4P9ED@Gitee)

    🐞Bug修复

    • 【http 】 HttpUtil重定向次数失效问题(issue#I4O28Q@Gitee)
    • 【core 】 修复UrlPath空白path多/问题(issue#I49KAL@Gitee)
    • 【core 】 修复ServletUtil写出文件时未添加双引号导致逗号等特殊符号引起的问题(issue#I4P1BF@Gitee)
    • 【core 】 NumberUtil增加equals重载解决long传入判断问题(pr#2064@Github)
    • 【core 】 修复CsvParser行号有误问题(pr#2065@Github)
    • 【http 】 修复HttpRequest.of无法自动添加http前缀问题(issue#I4PEYL@Gitee)
    • 【core 】 修复 CharSequenceUtil.brief(str, maxLength) 方法字符串越界问题,以及 maxLength 部分值时结果与预期不符的问题(pr#2068@Github)
    • 【core 】 修复NamingCase中转换下划线字母+数字转换问题(issue#2070@Github)
    • 【core 】 修复split空判断不一致问题(pr#496@Gitee)
    • 【crypto 】 修复SM2.getDHex()前导0丢失,然后导致获取密钥错误(pr#2073@Github)
    • 【core 】 修复关于Calculator.conversion()方法EmptyStackException的bug(pr#2076@Github)
    • 【core 】 修复StrUtil.subBetweenAll循环bug(issue#I4PT3M@Gitee)

    5.7.18 (2021-12-25)

    🐣新特性

    • 【core 】 新增CollStreamUtil.groupKeyValue(pr#479@Gitee)
    • 【core 】 新增DatePattern.createFormatter(pr#483@Gitee)
    • 【core 】 增加IdUtil.getSnowflakeNextId(pr#485@Gitee)
    • 【log 】 log4j2的编译依赖改为api,core为test依赖(pr#2019@Github)
    • 【core 】 Img.scale缩小默认使用平滑模式,增加scale方法重载可选模式(issue#I4MY6X@Gitee)
    • 【core 】 excel添加写入图片的方法(pr#486@Gitee)
    • 【core 】 增加CollStreamUtil.groupBy(pr#484@Gitee)
    • 【core 】 增加CollUtil.setValueByMap(pr#482@Gitee)
    • 【core 】 LocalDateTimeUtil增加endOfDay重载(issue#2025@Github)
    • 【core 】 IoCopier增加setFlushEveryBuffer方法(issue#2022@Github)

    🐞Bug修复

    • 【core 】 LineReadWatcher#onModify文件清空判断问题(issue#2013@Github)
    • 【core 】 修复4位bytes转换float问题(issue#I4M0E4@Gitee)
    • 【core 】 修复CharSequenceUtil.replace问题(issue#I4M16G@Gitee)
    • 【json 】 修复JSONObject 初始化大小值未被使用问题(issue#2016@Github)
    • 【core 】 修复StrUtil.startWith都为null返回错误问题(issue#I4MV7Q@Gitee)
    • 【core 】 修复PasswdStrength检测问题(issue#I4N48X@Gitee)
    • 【core 】 修复UserAgentUtil解析EdgA无法识别问题(issue#I4MCBP@Gitee)
    • 【extra 】 修复Archiver路径前带/问题(issue#I4NS0F@Gitee)
    • 【extra 】 修复getMainColor方法中参数rgbFilters无效问题(pr#2034@Github)
    • 【core 】 修复ChineseDate无法区分闰月问题(issue#I4NQQW@Gitee)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v1.0.7)
  • v1.0.7(Dec 7, 2021)

  • v1.0.6(Nov 2, 2021)

    • feat: 正式支持 LDAP 中用户的登录认证
    • fix: 重构发布快照流水线。 (Github PR #15)
    • fix: Github PR #16
    • fix: Gitee Issue #I4FGZ1
    • change: 修改 JapUserService 接口中的 createAndGetHttpApiUser 方法名使其更符合语义。 (Github PR #13)
    • change: 为 AbstractJapStrategy 的子类增加构造函数,支持自定义 JapUserStore。(Gitee Issue #I4BHBJ
    • change: [jap-ids] 将 AccessToken 中的 LocalDateTime 改为 Date
    • change: 升级 hutool 的版本为 5.7.14
    • change: 升级 JustAuth 的版本为 1.16.5
    • change: 更新了一些错误的文案

    • feat: Support LDAP.
    • fix: Github PR #15
    • fix: Github PR #16
    • fix: Gitee Issue #I4FGZ1
    • change: optimize JapUserService interface to fix jap-http-api module. (Github PR #13)
    • change: Add a constructor for subclasses of AbstractJapStrategy, support custom JapUserStore. (Gitee Issue #I4BHBJ)
    • change: [jap-ids] Change the LocalDateTime in AccessToken to Date
    • change: Upgrade hutool to 5.7.14
    • change: Upgrade JustAuth to 1.16.5
    Source code(tar.gz)
    Source code(zip)
  • v1.0.5(Sep 24, 2021)

    • feat: Add jap-http-api module. (Gitee Issue #I43ZS7)
    • feat: Add jap-ids-web module. Package the filter of ids as a separate component.
    • feat: add HTTP servlet adapter to decouple jakarta servlets. Note [1]
    • feat: [jap-social] Support to bind the account of the third-party platform. (Gitee Issue #I46J6W)
    • change: [jap-ids] scope changed to optional.
    • change: [jap-sso] Upgrade kisso to 3.7.7, Solve the vulnerability of jackson.
    • change: [jap-mfa] Upgrade googleauth to 1.5.0, Solve the vulnerability of apache httpclient.
    • change: Replace the theme of the document site https://justauth.plus to solve the problem of the soaring memory of the document site. (Gitee Issue I4958H | Github Issue 8)
    • change: Upgrade simple-http to 1.0.5.
    • change: Upgrade JustAuth to 1.16.4.
    • change: Optimize code.

    Note [1]:

    In versions prior to version 1.0.5 of jap, rely on the HttpServletRequest, Cookie, HttpServletResponse, and HttpSession under the javax.servlet.http package in jakarta-servlet, such as:

    // Interface provided by jap
    public interface JapStrategy {
      default JapResponse authenticate(AuthenticateConfig config, HttpServletRequest request, HttpServletResponse response) {
        return null;
      }
    }
    
    // Use jap in spring framework
    XxJapStrategy.authenticate(config,request,response);
    

    In order to improve the adaptability of the framework, since version 1.0.5, JAP removed the dependency of jakarta-servlet and adopted a new set of interfaces (reference: jap-http ).

    The developer needs to adapt the original request when calling the JAP interface.

    For example, if the developer uses jakarta-servlet, then the HttpServletRequest needs to be adapted:

    // Use 1.0.5 or higher version of jap in spring framework
    XxJapStrategy.authenticate(config,new JakartaRequestAdapter(request),new JakartaResponseAdapter(response));
    

    • feat: 增加 jap-http-api 模块。 (Gitee Issue #I43ZS7)
    • feat: 增加 jap-ids-web 模块。 将 jap-ids 的过滤器打包为一个单独的组件。
    • feat: 添加 HTTP servlet 适配器以解耦 jakarta servlet。注[1]
    • feat: [jap-social] 支持绑定第三方平台账号,该版本将社会化登录和绑定账号独立开来,以使其更加使用与多场景。 (Gitee Issue #I46J6W)
    • change: [jap-ids] scope 在各个流程中都更改为可选,遵循 RFC6749 规范。
    • change: [jap-sso] 升级 kisso 的版本为 3.7.7, 解决 jackson 的漏洞
    • change: [jap-mfa] 升级 googleauth 的版本为 1.5.0, 解决 apache httpclient 的漏洞
    • change: 替换文档站主题 https://justauth.plus,解决文档站内存暴涨的问题。(Gitee Issue #I4958H | Github Issue #8
    • change: 升级 simple-http 的版本为 1.0.5.
    • change: 升级 JustAuth 的版本为 1.16.4.
    • change: 优化代码,添加 package-info。

    注[1]:

    在 1.0.5 以前版本,jap 中依赖 jakarta-servletjavax.servlet.http 包下的 HttpServletRequestCookieHttpServletResponseHttpSession,比如:

    // jap 提供的接口
    public interface JapStrategy {
      default JapResponse authenticate(AuthenticateConfig config, HttpServletRequest request, HttpServletResponse response) {
        return null;
      }
    }
    
    // 在spring框架中使用 jap
    XxJapStrategy.authenticate(config,request,response);
    

    为了提高框架适配性,自 1.0.5 版本开始,JAP 去掉了 jakarta-servlet 依赖,采用了一套全新的接口(参考:jap-http),开发者在调用 JAP 接口时需要对原 request 进行适配。

    比如,开发者使用了 jakarta-servlet,那么需要对 HttpServletRequest 进行适配处理:

    // 在spring框架中使用 1.0.5 或更高级版本的 jap
    XxJapStrategy.authenticate(config,new JakartaRequestAdapter(request),new JakartaResponseAdapter(response));
    
    Source code(tar.gz)
    Source code(zip)
  • v1.0.4(Aug 15, 2021)

    • fix: [jap-ids] Support to generate custom token. (Gitee#I3U1ON)
    • fix: [jap-ids] Support custom verification of client_secret, such as: BCrypt, etc. (Gitee#I44032)
    • feat: [jap-ids] When IdsConfig#enableDynamicIssuer is true, custom context-path is supported.
    • fix: [jap-ids] Solve the problem of "After refreshing the token, the user information cannot be obtained with the new access token". (#I3XHTK)
    • feat: [jap-oauth2] Oauth2Strategy supports the following methods: refreshToken, revokeToken, getUserInfo
    • fix: [jap-social] Cannot customize JapCache and AuthStateCache of SocialStrategy at the same time. (Github#6)
    • fix: [jap-core] fix npe bug. (Github#5)
    • doc: change the template of issue and PR

    • fix: [jap-ids] 支持生成自定义 token(包含 access_token 和 refresh_token)。 (Gitee#I3U1ON)
    • fix: [jap-ids] 支持自定义验证 client_secret,适配多种场景,如:BCrypt 等。 (Gitee#I44032)
    • feat: [jap-ids] 当启用 IdsConfig#enableDynamicIssuer 时,支持自定义 context-path
    • fix: [jap-ids] 解决“刷新token后,用新的access_token无法获取用户信息”问题。 (Gitee#I3XHTK)
    • feat: [jap-oauth2] Oauth2Strategy 支持使用以下方法: refreshTokenrevokeTokengetUserInfo
    • fix: [jap-social] 无法同时自定义SocialStrategyJapCache and AuthStateCache.(Github#6)
    • fix: [jap-core] 修复 userId 为空时 NPE 异常. (Github#5)
    • doc: 更改 issue 和 pr 的模板
    Source code(tar.gz)
    Source code(zip)
  • v1.0.3(Jul 28, 2021)

  • v1.0.2(May 24, 2021)

    New features

    • jap-ids

      • Add the enableDynamicIssuer in IdsConfig. When enableDynamicIssuer=true, jap ids will automatically extract issuer from the currently requested domain name.
      • Add the loginPageUrl in IdsConfig:
        • loginPageUrl: login form page url
        • loginUrl: The api url for login
      • Add the externalLoginPageUrl in IdsConfig. when the login page is not provided by an authorized service (the login page is hosted by other services), you need to enable this configuration.
      • Add the externalConfirmPageUrl in IdsConfig. When the authorization confirmation page is not provided by an authorized service (the authorization confirmation page is hosted by other services), you need to enable this configuration.
      • Add the authorizeAutoApproveUrl in IdsConfig. When the authorize url contains autoapprove=true, it will not jump to the confirmPageUrl, but will jump directly to the authorizeAutoApproveUrl.
      • Add some scopes, such as profile, address, read and write.
      • Add the uid in the OauthUtil#createAuthorizeUrl(String, IdsRequestParam).
      • Add the IdsUserStoreService interface to support custom operations on user data after login.
      • Add the IdsPipeline interface, developers can customize the process, currently only supports the process of customizing IdsxxFilter and LoginEndpoint.
      • Add SPI plugin mechanism
    • jap-social

      • SocialStrategy provides methods of refreshToken, revokeToken, and getUserInfo

    Modified

    • jap

      • javax.servlet-api -> jakarta.servlet-api
    • jap-ids

      • Modify IdsConfig.confirmUrl to confirmPageUrl.
      • Modify the return value of ApprovalEndpoint#getAuthClientInfo(HttpServletRequest) to IdsResponse<String, Map<String, Object>>.
      • Modify the return value of Ap provalEndpoint#authorize(HttpServletRequest) to IdsResponse<String, String>.
      • Modify the return value of AuthorizationEndpoint#agree(HttpServletRequest) to IdsResponse<String, String>.
      • Modify the return value of LoginEndpoint#signin(HttpServletRequest) to IdsResponse<String, String>.
      • Modify the return value of LogoutEndpoint#logout(HttpServletRequest) to IdsResponse<String, String>.
      • Modify the comment content of ClientDetail.
      • Modify the return type of IdsResponse#getData() to the specified generic.
      • Remove IdsScopeProvider#initScopes(List<IdsScope>).
      • When response_type=id_token, the resulting Claims are returned in the ID Token.
      • Optimize the process of UserInfoEndpoint#getCurrentUserInfo(HttpServletRequest), Response UserInfo Claims using Scope Values.
      • Modify the loginByUsernameAndPassword and getByName methods of the IdsUserService interface, and add the clientId parameter, which can be used to distinguish multi-tenant scenarios

    PR

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Apr 21, 2021)

    New features

    • Add com.fujieid.jap.core.util.RequestUtil
    • Complete the development of the jap-ids module, and provide oauth services externally based on jap-ids

    jap ids is based on rfc6749, rfc7636, rfc7033 and other standard protocols and open id connect core 1.0 authentication protocol, a lightweight, business decoupling, and easy-to-use authorization & authentication framework is implemented.

    • Supported features
      • Authorization Code Grant
      • Proof Key for Code Exchange
      • Implicit Grant
      • Resource Owner Password Credentials Grant
      • Client Credentials Grant
      • Refresh access token
      • Revoke access token
      • Get the currently authorized user
      • Verify login status
      • Abnormal prompt
      • Sign out
      • OpenID Connect Discovery
      • JWK Endpoint
      • Custom jwt encryption and decryption certificate
      • Support multiple response types, such as: code, token, id token, id token token, code id token, code token, code id token token
      • ...

    For more details about the use of jap-ids, please refer to the sample project: jap-ids-demo, or refer to the document: IDS OAuth 2.0 服务端

    Modified

    • [jap-oidc] Optimize the OidcStrategy#authenticate method, cache the OidcDiscoveryDto, and reduce unnecessary http requests
    • [jap-oidc] Optimize the code of OidcUtil, fix known bugs
    • [jap-social] fix known bugs
    • Refactor com.fujieid.jap.core.cache.JapLocalCache, implement timer manually, clean local cache regularly

    PR

    Issue

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1-alpha.1(Mar 7, 2021)

  • v1.0.1-alpha(Mar 5, 2021)

    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 returnJapResponse

    jap-oidc

    • Modify the authenticate method of OidcStrategy to returnJapResponse

    jap-simple

    • Modify the authenticate method of SimpleStrategy to returnJapResponse

    jap-social

    • Modify the authenticate method of SocialStrategy to returnJapResponse

    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
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Feb 18, 2021)

    New features

    • added jap-mfa module to realize TOTP verification
    • The logout method is added to the JapUserStoreContextHolder to support clearing cookies and sessions
    • added test cases

    Modified

    • Updated jap.sh, support a variety of common commands
    • The options attribute in JapConfig is deleted, and the justathConfig attribute is added to SocialConfig
    • Change the name of RemberMeDetailsUtils to RembermeUtils
    • Move the Oauth2Strategy#checkOauthConfig() and Oauth2Strategy#isCallback() to the Oauth2Util

    Other

    • Improved code
    • Reconstruct the SimpleConfig, and move the unnecessary configuration items and business logic to the RememberMeUtils
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-alpha.1(Feb 1, 2021)

    New features

    • Add cache module com.fujieid.jap.core.cache.JapCache
    • Add 'state' verification logic in jap-oauth2
    • Add some package-info.java

    Modified

    • Revision notes
    • To solve the problem that 'codeverifier' in 'pkceutil' can only be cached locally
    • Upgrade simple-json to 0.0.2

    other

    • Fix Javadoc compilation failure
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-alpha(Jan 28, 2021)

Owner
Fujie
Just auth into any app
Fujie
Open Source Identity and Access Management For Modern Applications and Services

Keycloak Keycloak is an Open Source Identity and Access Management solution for modern Applications and Services. This repository contains the source

Keycloak 14.6k Jan 5, 2023
Unofficial Clubhouse web app client. For personal use only. It's a personal open-source project and not affiliated with any company.

Purpose of this web app That's a personal project and not affiliated with any company. This is the web client app to make your Club House experience b

Sergei Ovchinnikov 45 Nov 15, 2022
Security engine for Java (authentication, authorization, multi frameworks): OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...

pac4j is an easy and powerful security engine for Java to authenticate users, get their profiles and manage authorizations in order to secure web appl

PAC4J 2.2k Dec 30, 2022
A simple HWID authentication system for your minecraft mod.

HWID-Authentication-System A simple HWID authentication system for your minecraft mod. This is a simple mod which can prevent unwanted users from runn

null 43 Dec 10, 2022
A simple HWID authentication system for your minecraft mod.

HWID-Authentication-System A simple HWID authentication system for your minecraft mod. This is a simple mod which can prevent unwanted users from runn

null 43 Dec 10, 2022
Library to easily configure API Key authentication in (parts of) your Spring Boot Application

42 API Key Authentication A library to easily configure API Key authentication in (parts of) your Spring Boot Application. Features Easily configure A

null 2 Dec 8, 2021
A Vaadin example application that use Firebase Authentication as its user database

Vaadin + Firebase Auth example A trivial example to use Firebase Authentication with a Vaadin application. The app is built based on start.vaadin.com

Matti Tahvonen 3 Mar 9, 2022
Burp Extension for BFAC (Advanced Backup-File Artifacts Testing for Web-Applications)

BFAC - Burp Extension Burp Extension for BFAC (Advanced Backup-File Artifacts Testing for Web-Applications). What is BFAC - Burp Extension ? Backup fi

SEC-IT 18 Jul 16, 2022
JSON Web Token (JWT) implementation for Java with support for signatures (JWS), encryption (JWE) and web keys (JWK).

Nimbus JOSE+JWT Nimbus JOSE+JWT is a popular open source (Apache 2.0) Java library which implements the Javascript Object Signing and Encryption (JOSE

Connect2ID 35 Jul 1, 2022
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

Cossack Labs 1.6k Dec 29, 2022
Tink is a multi-language, cross-platform, open source library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.

Tink A multi-language, cross-platform library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse. Ubuntu

Google 12.9k Jan 3, 2023
Jacksum (JAva ChecKSUM) is a free, open source, cross-platform, feature-rich, multi-threaded command line tool for calculating hash values, verifying data integrity, finding files by their fingerprints, and finding algorithms to a hash value.

Jacksum (JAva ChecKSUM) is a free, open source, cross-platform, feature-rich, multi-threaded command line tool for calculating hash values, verifying data integrity, finding files by their fingerprints, and finding algorithms to a hash value.

Johann N. Löfflmann 17 Dec 26, 2022
Jsp Decoder Source Code

AntSword-JSP-Decoder 解码器模版 编译 python build.py 使用 将 dist/ 目录生成的 js 覆盖 antSword/source/core/jsp/decoder/ 目录下的文件 也可以直接从

null 15 Jun 20, 2022
JObfuscator is a source code obfuscator for the Java language

JObfuscator is a source code obfuscator for the Java language. Protect Java source code & algorithms from hacking, cracking, reverse engineering, decompilation & technology theft.

Bartosz Wójcik 8 Nov 6, 2022
PicketLink is a security framework for securing Java EE applications.

PicketLink http://picketlink.org Java EE Application Security Identity Management Federation Social REST Security Standard-based Security This reposit

PicketLink 92 Feb 21, 2022
Messenger - A Java based project making use of Sockets for communication between the applications running on different JRE

Messenger - A Java based project making use of Sockets for communication between the applications running on different JRE. Multiple clients can connect at the same time and can send messages to each other, they also get the information of status of their friends connected to the server .

Sarthak Aggarwal 1 Jan 2, 2022
Java JWT: JSON Web Token for Java and Android

Java JWT: JSON Web Token for Java and Android JJWT aims to be the easiest to use and understand library for creating and verifying JSON Web Tokens (JW

null 8.8k Dec 30, 2022
Jwks RSA - JSON Web Key Set parser.

jwks-rsa Install Maven <dependency> <groupId>com.auth0</groupId> <artifactId>jwks-rsa</artifactId> <version>0.17.0</version> </dependency>

Auth0 158 Dec 30, 2022
一个轻量级Web蜜罐 - A Little Web Honeypot.🍯🍯🍯🐝🐝🐝

Loki Releases下载:https://github.com/TheKingOfDuck/Loki/releases/tag/0.1 更新日志 20210107 实现多端口监听 20210103 实现动态配置相关页面 20210124 实现配置指定端口指向指定模板文件 20210131 捕获

鸭王 150 Dec 5, 2022