Multi-Tenant Spring Security Integration
Dependency :
compile ":multi-tenant-spring-security:0.2.1"
Summary
Installation
grails install-plugin multi-tenant-spring-security
Description
Integrates the multi-tenant-core plugin with the spring-security-core plugin, so that the current tenant can be determined from the authenticated principal.Provides a custom CurrentTenant implementation that uses the security context to identify the current tenant. This allows all users to login from one url instead of having to remember a special url to log in to.In Config.groovy, your tenant resolver property should look like this:
You will also need to add the following field to your Spring-Security User Domain Class
This plugin's code is based on the code of multi-tenant-acegi plugin and hosted in github.
tenant {
resolver.type = "springSecurity"
}Integer userTenantId