December 2017
Intermediate to advanced
372 pages
8h 46m
English
In some cases, we may need to integrate our application security with an identity store not directly supported by the security API, for example, we may have a requirement to integrate with an existing commercial security product. For cases like this, the Java EE security API allows us to roll our own identity store definition.
To handle custom identity stores, we need to create an application-scoped CDI bean; the bean must implement the IdentityStore interface, as illustrated in the following example:
package net.ensode.javaee8book.security.basicauthexample; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import javax.annotation.PostConstruct; import javax.enterprise.context.ApplicationScoped; ...