This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonSlurper | |
import groovy.json.JsonOutput | |
def jsonSlurper = new JsonSlurper() | |
def secrets = jsonSlurper.parse(new File(args[1] ?: "secrets.json")).clients.inject([:]) { map, c -> map[c.client] = c.secret; map } | |
def realm = jsonSlurper.parse(new File(args[0])) | |
for(client in realm.clients) { | |
if(secrets[client.clientId]) { |