public class NoOpAuthorizer extends Object implements Authorizer
Authorizer when authorization is disabled.| Constructor and Description |
|---|
NoOpAuthorizer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addGroupsToResource(String resourceType,
String resourceName,
String action,
List<String> groups)
Allow given groups to access the givne resource.
|
void |
addProtectedResource(String resourceType,
String resourceName,
boolean durable,
String owner)
Create auth resource.
|
boolean |
authorize(String scopeName,
String userId)
Authorize user with given scope key.
|
boolean |
authorize(String resourceType,
String resource,
String action,
String userId)
Authorize resource with given resource and action.
|
boolean |
changeResourceOwner(String resourceType,
String resourceName,
String owner)
Create auth resource.
|
void |
deleteProtectedResource(String resourceType,
String resourceName)
Delete auth resource.
|
AuthResource |
getAuthResource(String resourceType,
String resourceName)
Query auth resource.
|
void |
initialize(io.ballerina.messaging.broker.common.StartupContext startupContext)
Initialize authorization strategy based on given auth configuration, user store manager and data source.
|
boolean |
removeGroupFromResource(String resourceType,
String resourceName,
String action,
String group)
Revoke access from the given group.
|
public void initialize(io.ballerina.messaging.broker.common.StartupContext startupContext)
Authorizerinitialize in interface AuthorizerstartupContext - the startup context provides registered services for authProviderpublic boolean authorize(String scopeName, String userId)
Authorizerauthorize in interface AuthorizerscopeName - a scope keyuserId - an user identifierpublic boolean authorize(String resourceType, String resource, String action, String userId)
Authorizerauthorize in interface AuthorizerresourceType - resource Typeresource - resourceaction - actionuserId - user identifierpublic void addProtectedResource(String resourceType, String resourceName, boolean durable, String owner)
AuthorizeraddProtectedResource in interface AuthorizerresourceType - resource typeresourceName - resource namedurable - is durableowner - resource ownerpublic void deleteProtectedResource(String resourceType, String resourceName)
AuthorizerdeleteProtectedResource in interface AuthorizerresourceType - resource typeresourceName - resource namepublic boolean addGroupsToResource(String resourceType, String resourceName, String action, List<String> groups)
AuthorizeraddGroupsToResource in interface AuthorizerresourceType - resource typeresourceName - resource nameaction - actiongroups - list of group to addpublic boolean removeGroupFromResource(String resourceType, String resourceName, String action, String group)
AuthorizerremoveGroupFromResource in interface AuthorizerresourceType - resource typeresourceName - resource nameaction - actiongroup - grouppublic boolean changeResourceOwner(String resourceType, String resourceName, String owner)
AuthorizerchangeResourceOwner in interface AuthorizerresourceType - resource typeresourceName - resource nameowner - newOwnerpublic AuthResource getAuthResource(String resourceType, String resourceName)
AuthorizergetAuthResource in interface AuthorizerresourceType - resource typeresourceName - resource nameCopyright © 2018 WSO2. All rights reserved.