DatabaseIdentityStoreDefinition

@DatabaseIdentityStoreDefinition annotation is used for a database that stores the user identity information. Applications can be configured to use a database to store the identity, and queries will be specified, one for retrieving user information, and the other for group identity information.

For example, if we add this annotation and specify the lookup name and queries, it will then be used for validating the request:

@DatabaseIdentityStoreDefinition(
dataSourceLookup = "java:comp/env/jdbc/identityDS",
callerQuery = "select password from user where user_id = ?",
groupsQuery = "select group_name from groups where user_id = ?")
@ApplicationPath("home")
@ApplicationScoped
class ApplicationConfig : Application() {
override fun getClasses(): Set<Class<*>> {
val classes = HashSet<Class<*>>()
classes.add(Controller::class.java)
return classes
}
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset