Class DevSmsInboxController
java.lang.Object
com.irurueta.authserver.authorization.api.web.ott.DevSmsInboxController
- All Implemented Interfaces:
DevSmsInboxPageApi
@Controller
@Profile("dev")
public class DevSmsInboxController
extends Object
implements DevSmsInboxPageApi
Development only (
dev profile): renders the SMS messages the logging sender recorded instead of sending
them, so a developer or an end-to-end test can read the code of a sign-in or of a phone enrolment. The page is as
the contract apis/auth-server/web-pages/auth-server-pages-v1.yaml describes it through the generated
DevSmsInboxPageApi. The inbox exists only while the logging sender is in use, so it is looked up
lazily: with a real gateway configured the page is empty. It is a documented exception to the rule that
src/main holds no demo-only code (the end-to-end tests run the packaged jar, so it cannot live in
src/test); it is inert in every other profile because the controller is not even created.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPath of the page, taken from the contract.(package private) static final StringName of the model attribute that holds the recorded messages.private final PageRendererRenders the page.private final org.springframework.beans.factory.ObjectProvider<SmsInbox> The inbox of the logging sender; absent when a real gateway sends the messages.(package private) static final StringName of the template of the page.Fields inherited from interface com.irurueta.authserver.authorization.api.web.pages.v1.generated.api.DevSmsInboxPageApi
PATH_DEV_SMS_INBOX_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> Renders the recorded messages.
-
Field Details
-
DEV_SMS_INBOX_PATH
Path of the page, taken from the contract.- See Also:
-
VIEW_NAME
Name of the template of the page.- See Also:
-
MESSAGES_ATTRIBUTE
Name of the model attribute that holds the recorded messages.- See Also:
-
smsInbox
The inbox of the logging sender; absent when a real gateway sends the messages. -
pageRenderer
Renders the page.
-
-
Constructor Details
-
DevSmsInboxController
public DevSmsInboxController()
-
-
Method Details
-
devSmsInboxPage
Renders the recorded messages.- Specified by:
devSmsInboxPagein interfaceDevSmsInboxPageApi- Returns:
- the page, never cached because the messages carry codes.
-