@@ -28,10 +28,10 @@ import kotlin.test.assertIs
2828class OpenId4VciManagerConfigBuilderTest {
2929
3030 @Test
31- fun `ConfigBuilder builds Config with valid issuerUrl, clientId and authFlowRedirectionURI` () {
31+ fun `ConfigBuilder builds Config with valid issuerUrl, clientAuthenticationType and authFlowRedirectionURI` () {
3232 val builder = OpenId4VciManager .Config .Builder ()
3333 .withIssuerUrl(" https://issuer.example.com" )
34- .withClientId( " testClientId " )
34+ .withClientAuthenticationType( OpenId4VciManager . ClientAuthenticationType . AttestationBased )
3535 .withAuthFlowRedirectionURI(" app://redirect" )
3636
3737 val config = builder.build()
@@ -42,7 +42,7 @@ class OpenId4VciManagerConfigBuilderTest {
4242 @Test
4343 fun `ConfigBuilder throws exception when issuerUrl is not set` () {
4444 val builder = OpenId4VciManager .Config .Builder ()
45- .withClientId( " testClientId " )
45+ .withClientAuthenticationType( OpenId4VciManager . ClientAuthenticationType . AttestationBased )
4646 .withAuthFlowRedirectionURI(" app://redirect" )
4747
4848 assertThrows(IllegalStateException ::class .java) {
@@ -51,7 +51,7 @@ class OpenId4VciManagerConfigBuilderTest {
5151 }
5252
5353 @Test
54- fun `ConfigBuilder throws exception when clientId is not set` () {
54+ fun `ConfigBuilder throws exception when clientAuthenticationType is not set` () {
5555 val builder = OpenId4VciManager .Config .Builder ()
5656 .withIssuerUrl(" https://issuer.example.com" )
5757 .withAuthFlowRedirectionURI(" app://redirect" )
@@ -65,7 +65,7 @@ class OpenId4VciManagerConfigBuilderTest {
6565 fun `ConfigBuilder throws exception when authFlowRedirectionURI is not set` () {
6666 val builder = OpenId4VciManager .Config .Builder ()
6767 .withIssuerUrl(" https://issuer.example.com" )
68- .withClientId( " testClientId " )
68+ .withClientAuthenticationType( OpenId4VciManager . ClientAuthenticationType . AttestationBased )
6969
7070 assertThrows(IllegalStateException ::class .java) {
7171 builder.build()
@@ -76,13 +76,13 @@ class OpenId4VciManagerConfigBuilderTest {
7676 fun `ConfigBuilder sets issuerUrl correctly` () {
7777 val builder = OpenId4VciManager .Config .Builder ()
7878 .withIssuerUrl(" https://issuer.example.com" )
79- .withClientId( " testClientId " )
79+ .withClientAuthenticationType( OpenId4VciManager . ClientAuthenticationType . AttestationBased )
8080 .withAuthFlowRedirectionURI(" app://redirect" )
8181
8282 val config = builder.build()
8383
8484 assertEquals(" https://issuer.example.com" , config.issuerUrl)
85- assertEquals(" testClientId " , config.clientId )
85+ assertEquals(OpenId4VciManager . ClientAuthenticationType . AttestationBased , config.clientAuthenticationType )
8686 assertEquals(" app://redirect" , config.authFlowRedirectionURI)
8787 assertIs<OpenId4VciManager .Config .DPoPUsage .IfSupported >(config.dPoPUsage)
8888 assertEquals(Algorithm .ESP256 , config.dPoPUsage.algorithm)
@@ -92,7 +92,7 @@ class OpenId4VciManagerConfigBuilderTest {
9292 fun `ConfigBuilder sets useDPoPIfSupported correctly` () {
9393 val builder = OpenId4VciManager .Config .Builder ()
9494 .withIssuerUrl(" https://issuer.example.com" )
95- .withClientId( " testClientId " )
95+ .withClientAuthenticationType( OpenId4VciManager . ClientAuthenticationType . AttestationBased )
9696 .withAuthFlowRedirectionURI(" app://redirect" )
9797 .withDPoPUsage(OpenId4VciManager .Config .DPoPUsage .IfSupported ())
9898
0 commit comments