# e.g openaire.eu
+ authorization.security.session=openAIRESession # Default, do not change
+
+
+## Authorize Requests
+
+### Authorization Service
+
+In order to simplify the format of the Authorities, you can use
+this spring component to authorize your endpoints. There is also methods to
+get user's information.
+
+ public final String PORTAL_ADMIN = "PORTAL_ADMINISTRATOR";
+ public final String ANONYMOUS_USER = "ROLE_ANONYMOUS";
+ public final String REGISTERED_USER = "REGISTERED_USER";
+
+ /**
+ * Type = FUNDER | COMMUNITY | INSTITUTION | PROJECT
+ */
+ public String curator(String type) {}
+
+ /**
+ * Type = FUNDER | COMMUNITY | INSTITUTION | PROJECT
+ *
+ * Id = EE, EGI, etc
+ */
+ public String manager(String type, String id) { }
+
+ /**
+ * Type = FUNDER | COMMUNITY | RI | INSTITUTION | PROJECT
+ *
+ * Id = EE, EGI, etc
+ */
+ public String member(String type, String id)
+
+e.g
+
+ @PreAuthorize("hasAnyAuthority("
+ + "@AuthorizationService.PORTAL_ADMIN, "
+ + "@AuthorizationService.curator(#type), "
+ + "@AuthorizationService.manager(#type, #id)) "
+ + ")")
+ @RequestMapping(value = "{type}/{id}", method = RequestMethod.GET)
+ public Entity getEntity(@PathVariable("type") String type, @PathVariable("id") String id) {
\ No newline at end of file
diff --git a/src/main/java/eu/dnetlib/uoaauthorizationlibrary/security/AuthorizationService.java b/src/main/java/eu/dnetlib/uoaauthorizationlibrary/security/AuthorizationService.java
index c8f6505..cc4fb5e 100644
--- a/src/main/java/eu/dnetlib/uoaauthorizationlibrary/security/AuthorizationService.java
+++ b/src/main/java/eu/dnetlib/uoaauthorizationlibrary/security/AuthorizationService.java
@@ -38,7 +38,7 @@ public class AuthorizationService {
/**
* Type = FUNDER | COMMUNITY | INSTITUTION | PROJECT
- *
+ *
* Id = EE, EGI, etc
*/
public String manager(String type, String id) {
@@ -47,7 +47,7 @@ public class AuthorizationService {
/**
* Type = FUNDER | COMMUNITY | RI | INSTITUTION | PROJECT
- *
+ *
* Id = EE, EGI, etc
*/
public String member(String type, String id) {