mirror of
https://github.com/keycloak/keycloak.git
synced 2026-02-05 06:49:31 -06:00
Fix Cors example
This commit is contained in:
@@ -35,6 +35,9 @@ public class RSATokenVerifier {
|
||||
if (user == null) {
|
||||
throw new VerificationException("Token user was null.");
|
||||
}
|
||||
if (realmUrl == null) {
|
||||
throw new VerificationException("Realm URL is null. Make sure to add auth-server-url to the configuration of your adapter!");
|
||||
}
|
||||
if (!realmUrl.equals(token.getIssuer())) {
|
||||
throw new VerificationException("Token audience doesn't match domain.");
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"realm" : "cors",
|
||||
"resource" : "cors-database-service",
|
||||
"realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB",
|
||||
"auth-server-url": "http://localhost-auth:8080/auth",
|
||||
"bearer-only" : true,
|
||||
"ssl-required": "external",
|
||||
"enable-cors": true
|
||||
|
||||
Reference in New Issue
Block a user