Suppose I have the APIs as below:
/app/user_info
/app/car_info
The system is able to create different branch by user, like:
BranchA
BranchB
The APIs is branch wise, It will show the data according to the current branch id which is selected by the current logined user who switch the different branch in the front-end.
Now, we have a User who is able to access all the APIs in BranchA.
In the meanwhile, The User has a limited permissions to access APIs in the BranchB (Suppose User can only access /app/user_info).
|-----------------------------------------------------------------------|
| User | BranchA | /app/user_info, /app/car_info |
|-----------------------------------------------------------------------|
| User | BranchB | /app/user_info |
|-----------------------------------------------------------------------|
So how to cope with the similar scenario?
I think the Access Token should be changed if an user switch to different Branch
According to the OAuth, and the User should login if someone want get a new kinds of access token.
But, I think, It is not user friendly and unacceptable that it ask user login again and again when they switch the branch.