Authenticate By Tenant

45 views
Skip to first unread message

Jobert B

unread,
Jun 10, 2024, 6:36:21 PMJun 10
to WildFly
We have a product requirement where a user needs to be authenticated per tenant.

Details
  • We have a table called "company".
  • We have a user called "users".
    • User has a foreign key to a company.
  • When user logs in, we need to authenticate by
    • username
    • password
    • company - (a company name to be added as a filter when getting the user)
  • We created a User SPI to federate from our database to authenticate the user.

  1. Is there a way to get the custom param in User SPI during authentication process?
    1. Our client application will add a parameter in authentication url
    2. /openid-connect/auth?client_id&client_secret...&custom_param=company_a
  2. The User SPI will need to get this parameter before authenticating the user.
Thank you in advance!

Prarthona Paul

unread,
Jun 27, 2024, 10:46:59 AM (10 days ago) Jun 27
to WildFly
Hi there, 
Here is an guide that demonstrates how to use a custom config resolver to authenticate multiple telants using OIDC: https://wildfly-security.github.io/wildfly-elytron/blog/multi-tenancy-support-openid-connect/
I hope you find this useful. 
If you have any follow-up questions, please feel free to add it here. 
Best, 
Prarthona
Reply all
Reply to author
Forward
0 new messages