File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
main/java/io/camunda/tasklist/auth
test/java/io/camunda/tasklist/auth Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 6767 <artifactId >java-jwt</artifactId >
6868 <scope >test</scope >
6969 </dependency >
70+ <dependency >
71+ <groupId >org.assertj</groupId >
72+ <artifactId >assertj-core</artifactId >
73+ <scope >test</scope >
74+ </dependency >
7075
7176 </dependencies >
7277
Original file line number Diff line number Diff line change 11package io .camunda .tasklist .auth ;
22
3+ import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
34import com .fasterxml .jackson .annotation .JsonProperty ;
45
6+ @ JsonIgnoreProperties (ignoreUnknown = true )
57public class TokenResponse {
68
79 @ JsonProperty ("access_token" )
Original file line number Diff line number Diff line change 1+ package io .camunda .tasklist .auth ;
2+
3+ import static org .assertj .core .api .Assertions .*;
4+
5+ import com .fasterxml .jackson .databind .ObjectMapper ;
6+ import io .camunda .tasklist .auth .TokenResponseMapper .JacksonTokenResponseMapper ;
7+ import org .junit .jupiter .api .Test ;
8+
9+ public class TokenResponseTest {
10+ @ Test
11+ void shouldIgnoreUnknownFields () {
12+ TokenResponseMapper tokenResponseMapper = new JacksonTokenResponseMapper (new ObjectMapper ());
13+ TokenResponse tokenResponse = tokenResponseMapper .readToken ("{\" weird_field\" :123}" );
14+ assertThat (tokenResponse ).isNotNull ();
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments