Skip to content

Commit e8f627f

Browse files
TheMrMilchmannjgrandja
authored andcommitted
Use empty map for missing additional parameters
Closes gh-1826
1 parent 6880661 commit e8f627f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/authentication/OAuth2DeviceAuthorizationRequestAuthenticationToken.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 the original author or authors.
2+
* Copyright 2020-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -96,7 +96,7 @@ public OAuth2DeviceAuthorizationRequestAuthenticationToken(Authentication client
9696
this.deviceCode = deviceCode;
9797
this.userCode = userCode;
9898
this.authorizationUri = null;
99-
this.additionalParameters = null;
99+
this.additionalParameters = Collections.emptyMap();
100100
setAuthenticated(true);
101101
}
102102

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/authentication/OAuth2DeviceVerificationAuthenticationToken.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 the original author or authors.
2+
* Copyright 2020-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -80,7 +80,7 @@ public OAuth2DeviceVerificationAuthenticationToken(Authentication principal, Str
8080
this.principal = principal;
8181
this.userCode = userCode;
8282
this.clientId = clientId;
83-
this.additionalParameters = null;
83+
this.additionalParameters = Collections.emptyMap();
8484
setAuthenticated(true);
8585
}
8686

0 commit comments

Comments
 (0)