Package org.eclipse.hono.auth
Interface Authorities
- All Known Implementing Classes:
AuthoritiesImpl
public interface Authorities
A collection of authorities granted on resources and/or operations.
-
Method Summary
Modifier and TypeMethodDescriptionasMap()
Gets the authorities as a map of claims.boolean
isAuthorized
(ResourceIdentifier resourceId, String operation) Checks if these authorities include claims allowing execution of an operation of a resource.boolean
isAuthorized
(ResourceIdentifier resourceId, Activity intent) Checks if these authorities include claims allowing an intended activity on a resource.
-
Method Details
-
isAuthorized
Checks if these authorities include claims allowing an intended activity on a resource.- Parameters:
resourceId
- The resource.intent
- The intended activity on the resource- Returns:
true
if the activity is allowed.
-
isAuthorized
Checks if these authorities include claims allowing execution of an operation of a resource.- Parameters:
resourceId
- The resource.operation
- The operation to execute.- Returns:
true
if execution is allowed.
-
asMap
Gets the authorities as a map of claims.- Returns:
- The claims.
-