X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=include%2Fafb%2Fafb-auth.h;h=da4f8be84f706f38670454dee294f7a111387bb9;hb=1d550bd6d5caad377a22425cb9f346b011cf527b;hp=fe29adec984444aec834d480acaa8f6398a22296;hpb=863d6041e2ff2daa97fb1befb79dc3a69093e112;p=src%2Fapp-framework-binder.git diff --git a/include/afb/afb-auth.h b/include/afb/afb-auth.h index fe29adec..da4f8be8 100644 --- a/include/afb/afb-auth.h +++ b/include/afb/afb-auth.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 "IoT.bzh" + * Copyright (C) 2016, 2017, 2018 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,19 +22,24 @@ */ enum afb_auth_type { - afb_auth_No = 0, - afb_auth_Permission, - afb_auth_Or, - afb_auth_And, - afb_auth_Yes + afb_auth_No = 0, /** never authorized, no data */ + afb_auth_Token, /** authorized if token valid, no data */ + afb_auth_LOA, /** authorized if LOA greater than data 'loa' */ + afb_auth_Permission, /** authorized if permission 'text' is granted */ + afb_auth_Or, /** authorized if 'first' or 'next' is authorized */ + afb_auth_And, /** authorized if 'first' and 'next' are authorized */ + afb_auth_Not, /** authorized if 'first' is not authorized */ + afb_auth_Yes /** always authorized, no data */ }; -struct afb_auth_desc +struct afb_auth { enum afb_auth_type type; union { const char *text; - struct afb_auth_desc *child[2]; + unsigned loa; + const struct afb_auth *first; }; + const struct afb_auth *next; };