Class 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.
    • Method Detail

      • filter

        public void filter​(@NotNull
                           jakarta.ws.rs.container.ContainerRequestContext requestContext)
                    throws IOException
        Specified by:
        filter in interface jakarta.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.