Skip to content

Commit

Permalink
Wip of the authorization API
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Oct 31, 2022
1 parent ef7eb92 commit c203f51
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package edu.internet2.tier.shibboleth.admin.ui.security.service;

import java.io.Serializable;

/**
* Will be used as a key for PersmissionEvaluator return types
*/
public interface IPersistentEntityTupple extends Serializable {

String getId();

Class getType();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package edu.internet2.tier.shibboleth.admin.ui.security.service;

import org.springframework.security.access.PermissionEvaluator;
import org.springframework.security.core.Authentication;

import java.util.Collection;
import java.util.Map;

public interface IShibUiPermissionEvaluator extends PermissionEvaluator {

Collection getPersistentEntitiesWithPermission(Authentication authentication, Object permission);

/**
* Get ALL persistent entities that user has access to
* @param authentication
* @return
*/
Map<IPersistentEntityTupple, Object> getPersistentEntities(Authentication authentication);

Map<IPersistentEntityTupple, Object> getPersistentEntities(Authentication authentication, Class clazz);

}

0 comments on commit c203f51

Please sign in to comment.