powerauth-server
powerauth-server copied to clipboard
Extend annotations by support for roles and flags
Since we are injecting application roles and activation flags into the authentication object, we should be able to declare expected roles and flags beforehand, as a part of the annotation, i.e.:
@PowerAuth(
resourceId = "/operation/action",
signatureType = { PowerAuthSignatureTypes.POSSESSION }),
applicationRoles = { "MTOKEN" },
activationFlags = { "FULLY_ACTIVATED" }
)
Of course, this does not handle everything (i.e., negative queries - "only activations that do not have a flag can..."), but it should be an improvement for most cases.