November 2018
Intermediate to advanced
388 pages
9h 5m
English
Using the @CustomFormAuthenticationMechanismDefinition annotation, the application can be configured to use a custom form for authentication. Here, we can specify the custom login page and an implementation for validating the credentials, as follows:
@CustomFormAuthenticationMechanismDefinition( loginToContinue = LoginToContinue(loginPage = "/login.jsf"))@ApplicationScopedclass ApplicationConfig : Application() { override fun getClasses(): Set<Class<*>> { val classes = HashSet<Class<*>>() classes.add(Controller::class.java) return classes }}
We can also implement the HttpAuthenticationMechanism interface and provide the custom authentication mechanism.
The HttpAuthenticationMechanism defines three functions, ...
Read now
Unlock full access