AuthEndpoint

public protocol AuthEndpoint : RestEndpoint

A special RestEndpoint used to provide a common interface for endpoints which provide access to the .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<U: CorvusModelAuthenticatable>(
        _ user: AuthModifier<Self, U>.UserKeyPath
    ) -> AuthModifier<Self, U>

    Parameters

    user

    A KeyPath to the related user property.

    Return Value

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

  • 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<I: CorvusModel, U: CorvusModelAuthenticatable> (
        _ intermediate: NestedAuthModifier<Self, I, U>.IntermediateKeyPath,
        _ user: NestedAuthModifier<Self, I, U>.UserKeyPath
    ) -> NestedAuthModifier<Self, I, U>

    Parameters

    intermediate

    A KeyPath to the intermediate property.

    user

    A KeyPath to the related user property from the intermediate.

    Return Value

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