add custom authentication checks

This commit is contained in:
Dzmitry_Tamashevich@epam.com
2020-11-04 23:01:08 +03:00
committed by Daniel Hutzel
parent 3cf02cb567
commit 70b0c85346
14 changed files with 172 additions and 112 deletions

View File

@@ -22,17 +22,34 @@ service Users {
email : String(60);
}
@(requires : 'authenticated-user')
@(restrict : [
{
grant : '*',
to : 'customer'
},
{
grant : '*',
to : 'employee'
},
])
action updatePerson(person : Person);
@(requires : 'authenticated-user')
@(restrict : [
{
grant : '*',
to : 'customer'
},
{
grant : '*',
to : 'employee'
},
])
function getPerson() returns Person;
function mockLogin(email : String(111), password : String(200)) returns {
roles : array of String(111);
level : Integer;
mockedToken : String(500);
email : my.Person.email;
ID : my.Person.ID
action login(email : String(111), password : String(200)) returns {
roles : array of String(111);
token : String(500);
email : String(500);
ID : Integer;
};
}