Skip to content

Commit

Permalink
AUT-936 Add TEST of EID-SK 2016 certificate chain Mobile-ID test
Browse files Browse the repository at this point in the history
  • Loading branch information
Steinhain committed Jun 2, 2022
1 parent 37d2dd4 commit 099a336
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/groovy/ee/ria/tara/AuthenticationSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ class AuthenticationSpec extends TaraSpecification {
assertThat(claims.getJSONObjectClaim("profile_attributes").get("given_name"), equalTo("ONE"))
}

@Unroll
@Feature("AUTHENTICATION")
def "request authentication with mobile-ID. TEST of EID-SK 2016 chain certificate"() {
expect:
Steps.startAuthenticationInTara(flow)
Response midAuthResponse = Steps.authenticateWithMid(flow,"60001017869", "68000769")
Response authenticationFinishedResponse = Steps.submitConsentAndFollowRedirects(flow, true, midAuthResponse)
Response tokenResponse = Steps.getIdentityTokenResponse(flow, authenticationFinishedResponse)

JWTClaimsSet claims = Steps.verifyTokenAndReturnSignedJwtObject(flow, tokenResponse.getBody().jsonPath().get("id_token")).getJWTClaimsSet()
assertThat(claims.getAudience().get(0), equalTo(flow.oidcClient.clientId))
assertThat(claims.getSubject(), equalTo("EE60001017869"))
assertThat(claims.getJSONObjectClaim("profile_attributes").get("given_name"), equalTo("EID2016"))
}

@IgnoreIf({ properties['test.deployment.env'] == "idp" })
@Unroll
@Feature("AUTHENTICATION")
Expand Down

0 comments on commit 099a336

Please sign in to comment.