package com.photoz.authz.policy.admin

import org.keycloak.authorization.policy.evaluation.Evaluation;

rule "Authorize Using Context Information"
    dialect "mvel"
    when
       $evaluation : Evaluation(
           $attributes: context.attributes,
           $attributes.containsValue("kc.identity.authc.method", "otp"),
           $attributes.containsValue("someAttribute", "you_can_access")
       )
    then
        $evaluation.grant();
end