let exceptionPaths = ["/v1/identity/check","/v1/identity/token"]
let hostname = "http://localhost"
let port = 8080
let iamConfig = IAMConfig(hostname: hostname,
port: port,
exceptionPaths: exceptionPaths)
services.register(iamConfig)
import IAM
extension User: IAMPolicyAllowable {}
let allowedPolicy = User.IAMAuthPolicyMiddleware(allowed: ["ROOT"])
let groups = router.grouped("groups").grouped(allowedPolicy)