powerauth-server icon indicating copy to clipboard operation
powerauth-server copied to clipboard

Extend annotations by support for roles and flags

Open petrdvorak opened this issue 4 years ago • 0 comments

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.

petrdvorak avatar Dec 23 '20 09:12 petrdvorak