0aeb9af696
add config properties, adapt setup from clevermicro/identity-management#9 replace role-based forward auth with UMA ticket add pass-through config implement unit tests for the change. ISSUES CLOSED: clevermicro/user-management#28
35 lines
1.0 KiB
Java
35 lines
1.0 KiB
Java
package com.cleverthis.authservice.service;
|
|
|
|
import com.cleverthis.authservice.config.PermissionMappingConfigProperties;
|
|
import java.util.List;
|
|
import java.util.Optional;
|
|
|
|
/**
|
|
* Service for looking up the permission map.
|
|
*/
|
|
public interface PermissionMapLookupService {
|
|
/**
|
|
* The default client id when no rules matched.
|
|
* If not provided, might be null or empty.
|
|
*/
|
|
String getDefaultKeycloakClientId();
|
|
|
|
/**
|
|
* Given the path, find the client id of the first rule matching the path prefix.
|
|
*/
|
|
Optional<String> matchClientIdByPath(String path);
|
|
|
|
/**
|
|
* Given the client id and path, find the rule that both matches the client id exactly,
|
|
* and match the path prefix.
|
|
*/
|
|
Optional<PermissionMappingConfigProperties.Rule> matchRuleByClientIdAndPath(
|
|
String clientId, String path);
|
|
|
|
/**
|
|
* Return the list of pass-through rules by client id.
|
|
*/
|
|
List<PermissionMappingConfigProperties.PassThrough> getPassThoughRulesByClientId(
|
|
String clientId);
|
|
}
|