@@ -970,7 +970,7 @@ func TestIsStandardDiscovery(t *testing.T) {
970
970
func TestFormatUsername (t * testing.T ) {
971
971
tests := []struct {
972
972
name string
973
- username interface {}
973
+ username any
974
974
usernameExpected string
975
975
errorExpected error
976
976
}{{
@@ -1014,7 +1014,7 @@ func TestJWTRolesChannels(t *testing.T) {
1014
1014
)
1015
1015
type simulatedLogin struct {
1016
1016
explicitRoles , explicitChannels []string
1017
- claims map [string ]interface {}
1017
+ claims map [string ]any
1018
1018
expectedRoles , expectedChannels []string
1019
1019
}
1020
1020
type testCase struct {
@@ -1037,7 +1037,7 @@ func TestJWTRolesChannels(t *testing.T) {
1037
1037
rolesClaimName : "roles" ,
1038
1038
logins : []simulatedLogin {
1039
1039
{
1040
- claims : map [string ]interface {} {"roles" : []string {"foo" }},
1040
+ claims : map [string ]any {"roles" : []string {"foo" }},
1041
1041
expectedRoles : []string {"foo" },
1042
1042
expectedChannels : []string {"!" },
1043
1043
},
@@ -1048,7 +1048,7 @@ func TestJWTRolesChannels(t *testing.T) {
1048
1048
rolesClaimName : "roles" ,
1049
1049
logins : []simulatedLogin {
1050
1050
{
1051
- claims : map [string ]interface {} {},
1051
+ claims : map [string ]any {},
1052
1052
expectedRoles : []string {},
1053
1053
expectedChannels : []string {"!" },
1054
1054
},
@@ -1060,7 +1060,7 @@ func TestJWTRolesChannels(t *testing.T) {
1060
1060
logins : []simulatedLogin {
1061
1061
{
1062
1062
explicitRoles : []string {"bar" },
1063
- claims : map [string ]interface {} {"roles" : []string {"foo" }},
1063
+ claims : map [string ]any {"roles" : []string {"foo" }},
1064
1064
expectedRoles : []string {"foo" , "bar" },
1065
1065
expectedChannels : []string {"!" },
1066
1066
},
@@ -1071,12 +1071,12 @@ func TestJWTRolesChannels(t *testing.T) {
1071
1071
rolesClaimName : "roles" ,
1072
1072
logins : []simulatedLogin {
1073
1073
{
1074
- claims : map [string ]interface {} {"roles" : []string {"foo" }},
1074
+ claims : map [string ]any {"roles" : []string {"foo" }},
1075
1075
expectedRoles : []string {"foo" },
1076
1076
expectedChannels : []string {"!" },
1077
1077
},
1078
1078
{
1079
- claims : map [string ]interface {} {"roles" : []string {}},
1079
+ claims : map [string ]any {"roles" : []string {}},
1080
1080
expectedRoles : []string {},
1081
1081
expectedChannels : []string {"!" },
1082
1082
},
@@ -1088,7 +1088,7 @@ func TestJWTRolesChannels(t *testing.T) {
1088
1088
logins : []simulatedLogin {
1089
1089
{
1090
1090
explicitRoles : []string {"foo" },
1091
- claims : map [string ]interface {} {"roles" : []string {"foo" }},
1091
+ claims : map [string ]any {"roles" : []string {"foo" }},
1092
1092
expectedRoles : []string {"foo" },
1093
1093
expectedChannels : []string {"!" },
1094
1094
},
@@ -1100,13 +1100,13 @@ func TestJWTRolesChannels(t *testing.T) {
1100
1100
logins : []simulatedLogin {
1101
1101
{
1102
1102
explicitRoles : []string {"foo" },
1103
- claims : map [string ]interface {} {"roles" : []string {"foo" }},
1103
+ claims : map [string ]any {"roles" : []string {"foo" }},
1104
1104
expectedRoles : []string {"foo" },
1105
1105
expectedChannels : []string {"!" },
1106
1106
},
1107
1107
{
1108
1108
explicitRoles : []string {"foo" },
1109
- claims : map [string ]interface {} {"roles" : []string {}},
1109
+ claims : map [string ]any {"roles" : []string {}},
1110
1110
expectedRoles : []string {"foo" },
1111
1111
expectedChannels : []string {"!" },
1112
1112
},
@@ -1117,12 +1117,12 @@ func TestJWTRolesChannels(t *testing.T) {
1117
1117
rolesClaimName : "roles" ,
1118
1118
logins : []simulatedLogin {
1119
1119
{
1120
- claims : map [string ]interface {} {"roles" : []string {"foo" }},
1120
+ claims : map [string ]any {"roles" : []string {"foo" }},
1121
1121
expectedRoles : []string {"foo" },
1122
1122
expectedChannels : []string {"!" },
1123
1123
},
1124
1124
{
1125
- claims : map [string ]interface {} {"roles" : []string {"bar" }},
1125
+ claims : map [string ]any {"roles" : []string {"bar" }},
1126
1126
expectedRoles : []string {"bar" },
1127
1127
expectedChannels : []string {"!" },
1128
1128
},
@@ -1133,7 +1133,7 @@ func TestJWTRolesChannels(t *testing.T) {
1133
1133
channelsClaimName : "channels" ,
1134
1134
logins : []simulatedLogin {
1135
1135
{
1136
- claims : map [string ]interface {} {"channels" : []string {"foo" }},
1136
+ claims : map [string ]any {"channels" : []string {"foo" }},
1137
1137
expectedRoles : []string {},
1138
1138
expectedChannels : []string {"!" , "foo" },
1139
1139
},
@@ -1145,7 +1145,7 @@ func TestJWTRolesChannels(t *testing.T) {
1145
1145
logins : []simulatedLogin {
1146
1146
{
1147
1147
explicitChannels : []string {"bar" },
1148
- claims : map [string ]interface {} {"channels" : []string {"foo" }},
1148
+ claims : map [string ]any {"channels" : []string {"foo" }},
1149
1149
expectedRoles : []string {},
1150
1150
expectedChannels : []string {"!" , "foo" , "bar" },
1151
1151
},
@@ -1157,7 +1157,7 @@ func TestJWTRolesChannels(t *testing.T) {
1157
1157
channelsClaimName : "channels" ,
1158
1158
logins : []simulatedLogin {
1159
1159
{
1160
- claims : map [string ]interface {} {"roles" : []string {"rFoo" }, "channels" : []string {"cBar" }},
1160
+ claims : map [string ]any {"roles" : []string {"rFoo" }, "channels" : []string {"cBar" }},
1161
1161
expectedRoles : []string {"rFoo" },
1162
1162
expectedChannels : []string {"!" , "cBar" },
1163
1163
},
@@ -1169,7 +1169,7 @@ func TestJWTRolesChannels(t *testing.T) {
1169
1169
channelsClaimName : "channels" ,
1170
1170
logins : []simulatedLogin {
1171
1171
{
1172
- claims : map [string ]interface {} {"roles" : []string {"rFoo" }, "channels" : []string {"cBar" }},
1172
+ claims : map [string ]any {"roles" : []string {"rFoo" }, "channels" : []string {"cBar" }},
1173
1173
explicitRoles : []string {"rBaz" },
1174
1174
explicitChannels : []string {"cQux" },
1175
1175
expectedRoles : []string {"rFoo" , "rBaz" },
0 commit comments