Package io.micronaut.security.endpoints
Class LoginControllerConfigurationProperties
java.lang.Object
io.micronaut.security.endpoints.LoginControllerConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable,ControllerConfiguration,LoginControllerConfiguration
@Requires(property="micronaut.security.endpoints.login.enabled",
notEquals="false",
defaultValue="true")
@ConfigurationProperties("micronaut.security.endpoints.login")
public class LoginControllerConfigurationProperties
extends Object
implements LoginControllerConfiguration
- Since:
- 1.0
- Author:
- Sergio del Amo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull StringgetPath()intbooleanWhether the controller is enabled.voidsetEnabled(boolean enabled) Enables the controller.voidPath to the controller.voidsetPostContentTypes(Set<String> postContentTypes) Supported content types for POST endpoints.voidsetUnsupportedPostContentTypeStatus(int unsupportedPostContentTypeStatus) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.security.endpoints.ControllerConfiguration
getPath, getPostContentTypes, getUnsupportedPostContentTypeStatusMethods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
Deprecated, for removal: This API element is subject to removal in a future version.Not used.ControllerConfigurationProperties.DEFAULT_ENABLEDis used instead.The default enable value.- See Also:
-
DEFAULT_PATH
The default path.- See Also:
-
-
Constructor Details
-
LoginControllerConfigurationProperties
public LoginControllerConfigurationProperties()
-
-
Method Details
-
getPostContentTypes
- Specified by:
getPostContentTypesin interfaceControllerConfiguration- Returns:
- Supported HTTP methods for POST endpoints.
-
setPostContentTypes
Supported content types for POST endpoints. Default Value application/json and application/x-www-form-urlencoded- Parameters:
postContentTypes- supported content types for POST endpoints.
-
getUnsupportedPostContentTypeStatus
public int getUnsupportedPostContentTypeStatus()- Specified by:
getUnsupportedPostContentTypeStatusin interfaceControllerConfiguration- Returns:
- Status code for unsupported content type. Default to 404
-
setUnsupportedPostContentTypeStatus
public void setUnsupportedPostContentTypeStatus(int unsupportedPostContentTypeStatus) - Parameters:
unsupportedPostContentTypeStatus- Status code for unsupported content type. Default to 404
-
isEnabled
public boolean isEnabled()Whether the controller is enabled.- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable- Returns:
- Whether the controller is enabled.
-
getPath
- Specified by:
getPathin interfaceControllerConfiguration- Returns:
- the path where the controller is enabled.
-
setEnabled
public void setEnabled(boolean enabled) Enables the controller.- Parameters:
enabled- True if it is enabled
-
setPath
Path to the controller.- Parameters:
path- The path
-