Class DeviceConfiguration
java.lang.Object
com.irurueta.authserver.authorization.api.web.implicit.DeviceConfiguration
@Configuration(value="deviceWebConfiguration",
proxyBeanMethods=false)
@EnableConfigurationProperties(DeviceRateLimitProperties.class)
public class DeviceConfiguration
extends Object
Installs the device authorization grant in the protocol chain. Nothing outside this feature is edited: the chain
applies every
ProtocolChainCustomizer bean, in order.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeviceProtocolChainCustomizer(org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClients, org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService, org.springframework.security.oauth2.server.authorization.settings.AuthorizationServerSettings serverSettings, DeviceVerificationRateLimiter rateLimiter, MfaAuthorizationManager authorizationManager, SecondFactorRequiredEntryPoint secondFactorEntryPoint, ReauthenticationEntryPoint reauthenticationEntryPoint) Declares the customizer that enables the device endpoints.deviceVerificationRateLimiter(DeviceRateLimitProperties properties, Clock clock) Declares the limiter of the attempts to verify a user code.
-
Constructor Details
-
DeviceConfiguration
public DeviceConfiguration()
-
-
Method Details
-
deviceVerificationRateLimiter
@Bean public DeviceVerificationRateLimiter deviceVerificationRateLimiter(DeviceRateLimitProperties properties, Clock clock) Declares the limiter of the attempts to verify a user code.- Parameters:
properties- limits, window and bound of the tracked keys.clock- source of the current time.- Returns:
- the limiter.
-
deviceProtocolChainCustomizer
@Bean @Order(2) public ProtocolChainCustomizer deviceProtocolChainCustomizer(org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClients, org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService, org.springframework.security.oauth2.server.authorization.settings.AuthorizationServerSettings serverSettings, DeviceVerificationRateLimiter rateLimiter, MfaAuthorizationManager authorizationManager, SecondFactorRequiredEntryPoint secondFactorEntryPoint, ReauthenticationEntryPoint reauthenticationEntryPoint) Declares the customizer that enables the device endpoints. It is applied after the multi-factor and step-up ones.- Parameters:
registeredClients- finds the clients of the devices.authorizationService- finds the device authorization of a user code.serverSettings- settings of the protocol endpoints, for the device authorization one.rateLimiter- limits the attempts.authorizationManager- applies the multi-factor policy.secondFactorEntryPoint- entry point of the second-factor page.reauthenticationEntryPoint- entry point that forces a new sign-in.- Returns:
- the customizer.
-