UpdateEndpoint

public protocol UpdateEndpoint : AuthEndpoint

A special AuthEndpoint used to provide a common interface for Update components so they can access their own .auth modifier.

  • auth(_:) Extension method

    A modifier used to make sure components only authorize requests where the supplied user U is actually related to the QuerySubject.

    Declaration

    Swift

    public func auth<T: CorvusModelAuthenticatable>(
        _ user: UpdateAuthModifier<Self, T>.UserKeyPath
    ) -> UpdateAuthModifier<Self, T>

    Parameters

    user

    A KeyPath to the related user property.

    Return Value

    An instance of a UpdateAuthModifier with the supplied KeyPath to the user.