@ -18,6 +18,9 @@ package org.springframework.boot.autoconfigure.security.oauth2.server.servlet;
@@ -18,6 +18,9 @@ package org.springframework.boot.autoconfigure.security.oauth2.server.servlet;
import org.junit.jupiter.api.Test ;
import org.springframework.security.oauth2.server.authorization.settings.TokenSettings ;
import static org.assertj.core.api.Assertions.assertThat ;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException ;
/ * *
@ -69,4 +72,10 @@ class OAuth2AuthorizationServerPropertiesTests {
@@ -69,4 +72,10 @@ class OAuth2AuthorizationServerPropertiesTests {
. withMessage ( "Authorization grant types must not be empty." ) ;
}
@Test
void defaultDeviceCodeTimeToLiveMatchesBuilderDefault ( ) {
assertThat ( new OAuth2AuthorizationServerProperties . Client ( ) . getToken ( ) . getDeviceCodeTimeToLive ( ) )
. isEqualTo ( TokenSettings . builder ( ) . build ( ) . getDeviceCodeTimeToLive ( ) ) ;
}
}