UnauthorizedException | authorized,no permission access this resource
custom exception should extend SurenessAuthenticationException or SurenessAuthorizationException
Custom exception should extend SurenessAuthenticationException or SurenessAuthorizationException
### Load config dataSource
### Load Config DataSource
sureness need dataSource to authenticate and authorize, eg: role data, user data etc.
the dataSource can load from txt, dataBase or no dataBase etc.
we provide interfaces `SurenessAccountProvider`, `PathTreeProvider` for user implement to load data from the dataSource where they want.
also, we provide default dataSource implement which load dataSource from txt(sureness.yml), user can defined their data in sureness.yml.
Sureness need dataSource to authenticate and authorize, eg: role data, user data etc.
The dataSource can load from txt, dataBase or no dataBase etc.
We provide interfaces `SurenessAccountProvider`, `PathTreeProvider` for user implement to load data from the dataSource where they want.
Also, we provide default dataSource implement which load dataSource from txt(sureness.yml), user can defined their data in sureness.yml.
eg:
```
## -- sureness.yml txt dataSource-- ##
...
...
@@ -151,15 +151,15 @@ account:
If the configuration resource data comes from text, please refer to [10 Minute Tutorial's Program--sample-bootstrap](https://github.com/tomsun28/sureness/tree/master/sample-bootstrap)
If the configuration resource data comes from dataBase, please refer to [30 Minute Tutorial's Program--sample-tom](https://github.com/tomsun28/sureness/tree/master/sample-tom)
**Have Fun**
**Have Fun**
## Advanced Use
if know sureness [Process flow](#Process flow), maybe know the extend point
If know sureness [Process flow](#Process Flow), maybe know the extend point
sureness supports custom subject, custom subjectCreator, custom processor and more.
Sureness supports custom subject, custom subjectCreator, custom processor and more.
suggest look these interface before extending:
Suggest look these interface before extending:
-`Subject`: Authenticated authorized user's account interface, provide the account's username,password, request resources, roles, etc.