File tree Expand file tree Collapse file tree
security/providers/jwt/src/main/java/io/helidon/security/providers/jwt Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2018, 2021 Oracle and/or its affiliates.
2+ * Copyright (c) 2018, 2022 Oracle and/or its affiliates.
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.
@@ -169,12 +169,12 @@ private AuthenticationResponse authenticateToken(String token) {
169169 Errors errors = signedJwt .verifySignature (verifyKeys , defaultJwk );
170170 if (errors .isValid ()) {
171171 Jwt jwt = signedJwt .getJwt ();
172- // verify the audience is correct
172+ // perform all validations, including expected audience verification
173173 Errors validate = jwt .validate (null , expectedAudience );
174174 if (validate .isValid ()) {
175175 return AuthenticationResponse .success (buildSubject (jwt , signedJwt ));
176176 } else {
177- return failOrAbstain ("Audience is invalid or missing: " + expectedAudience );
177+ return failOrAbstain (validate . toString () );
178178 }
179179 } else {
180180 return failOrAbstain (errors .toString ());
You can’t perform that action at this time.
0 commit comments