Class AuthenticatedSubjectAliasFilter
- java.lang.Object
-
- com.unboundid.scim2.server.providers.AuthenticatedSubjectAliasFilter
-
- All Implemented Interfaces:
jakarta.ws.rs.container.ContainerRequestFilter
@Provider @PreMatching @Priority(3000) public class AuthenticatedSubjectAliasFilter extends Object implements jakarta.ws.rs.container.ContainerRequestFilter
A ContainerRequestFilter implementation to resolve the /Me alias to the path of the resource that represents the authenticated subject. This implementation will use the user principal within the SecurityContext as the resource ID and assumes the resource is part of the /Users resource type.
-
-
Constructor Summary
Constructors Constructor Description AuthenticatedSubjectAliasFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilter(jakarta.ws.rs.container.ContainerRequestContext requestContext)protected Collection<String>getAliases()Get the aliases for the authenticated subject.protected StringgetAuthenticatedSubjectPath(jakarta.ws.rs.core.SecurityContext securityContext)Get the path of the resource the represents the authenticated subject.
-
-
-
Constructor Detail
-
AuthenticatedSubjectAliasFilter
public AuthenticatedSubjectAliasFilter()
-
-
Method Detail
-
filter
public void filter(@NotNull jakarta.ws.rs.container.ContainerRequestContext requestContext) throws IOException
- Specified by:
filterin interfacejakarta.ws.rs.container.ContainerRequestFilter- Throws:
IOException
-
getAuthenticatedSubjectPath
@NotNull protected String getAuthenticatedSubjectPath(@Nullable jakarta.ws.rs.core.SecurityContext securityContext) throws ScimException
Get the path of the resource the represents the authenticated subject.- Parameters:
securityContext- The request's security context.- Returns:
- The path relative to the base URI.
- Throws:
ScimException- if an error occurs while resolving the path.
-
getAliases
@NotNull protected Collection<String> getAliases()
Get the aliases for the authenticated subject.- Returns:
- The aliases for the authenticated subject.
-
-