= Application Layer SPI

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
:page-partial:

Domain service SPIs influence how the framework handles application layer concerns, for example which home page to render to the end-user.

.Application Layer SPI
[cols="2m,4a",options="header"]
|===

|API
|Description



|xref:refguide:security:index/spring/authconverters/AuthenticationConverter.adoc[AuthenticationConverter]
|SPI service for xref:security:spring:about.adoc[Spring Security] to convert a Spring link:https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/core/Authentication.html[Authentication] into an Apache Causeway xref:refguide:applib:index/services/user/UserMemento.adoc[UserMemento].

Several implementations are provided by default for most of the common representations of a user principal.
This SPI does though provide additional flexibility for other security technologies that may be supported by link:https://spring.io/projects/spring-security[Spring].



|xref:refguide:applib:index/services/health/HealthCheckService.adoc[HealthCheckService]
|Performs a health check so that the runtime infrastructure can determine if the application is still healthy (and perform remedial action, such as restarting the app, if not).


|xref:refguide:applib:index/services/homepage/HomePageResolverService.adoc[HomePageResolverService]
|Returns the home page object, if any is defined.


|xref:refguide:applib:index/services/user/ImpersonateMenuAdvisor.adoc[ImpersonateMenuAdvisor]
|Provides a mechanism to influence the UI provided by xref:refguide:applib:index/services/user/ImpersonateMenu.adoc[ImpersonateMenu]



|xref:refguide:applib:index/services/user/ImpersonatedUserHolder.adoc[ImpersonatedUserHolder]
|Provides a mechanism to hold the impersonated user


|xref:refguide:applib:index/services/session/SessionSubscriber.adoc[SessionSubscriber]
|SPI service to listen on users logging in and logging off their (long-lived) session.

The xref:refguide:applib:index/services/session/SessionLogger.adoc[SessionLogger] is a trivial implementation that just logs the session start/end times.




|===

