Files
user-management/src/main/java/com/cleverthis/authservice/service/PermissionMapLookupService.java
T
hurui200320 0aeb9af696
Unit test coverage / gradle-test (push) Failing after 2m2s
CI for publishing docker image / build-and-publish (push) Successful in 2m39s
Unit test coverage / gradle-test (pull_request) Failing after 1m20s
refactor(General): replace role-based auth with UMA ticket
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
2025-06-16 14:42:40 +08:00

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);
}