简体   繁体   English

springboot - 基本的 ActiveDirectory 身份验证,然后是 JWT 令牌

[英]springboot - basic ActiveDirectory auth then JWT token

Has anyone got a working example of this in a springboot app?有没有人在 springboot 应用程序中有这样的工作示例?

  1. /auth controller where user provides ActiveDirectory credentials (either via basic auth or a POST json) and receives a JWT token if they provided valid AD credentials. /auth 控制器,用户在其中提供 ActiveDirectory 凭据(通过基本身份验证或 POST json)并在他们提供有效的 AD 凭据时接收 JWT 令牌。 No LDIF file should be involved, the Springboot app will verify the credentials against an ldaps://ActiveDirectoryhost:636 endpoint不应涉及 LDIF 文件,Springboot 应用程序将根据 ldaps://ActiveDirectoryhost:636 端点验证凭据
  2. /myapi controller which only works if valid JWT token from step1 (above) sent in 'Authorization Bearer' heading /myapi 控制器仅在来自步骤 1(以上)的有效 JWT 令牌以“授权承载”标题发送时才有效

I have not found any example blogs/guides with this setup but I believe this would be a common security setup unless I am mistaken?我没有找到任何具有此设置的示例博客/指南,但我相信这将是一个常见的安全设置,除非我弄错了? No jpa/hibernate/persistence/mysql/postgres/H2db connections should be involved All examples I found online either are just JWT, or just LDAP, or use LDIF or use some H2/postgres to store credentials.不应该涉及 jpa/hibernate/persistence/mysql/postgres/H2db 连接我在网上找到的所有示例要么只是 JWT,要么只是 LDAP,或者使用 LDIF 或使用一些 H2/postgres 来存储凭据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM