CreateEndpoint
public protocol CreateEndpoint : AuthEndpoint
A special AuthEndpoint used to provide a common interface for Create
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
Uis actually related to theQuerySubject.Declaration
Swift
public func auth<U: CorvusModelAuthenticatable>( _ user: CreateAuthModifier<Self, U>.UserKeyPath ) -> CreateAuthModifier<Self, U>Parameters
userA
KeyPathto the related user property.Return Value
An instance of a
CreateAuthModifierwith the suppliedKeyPathto the user. -
auth(_:Extension method_: ) A modifier used to make sure components only authorize requests where the supplied user
Uis actually related to theQuerySubject.Declaration
Swift
public func auth<I: CorvusModel, U: CorvusModelAuthenticatable> ( _ intermediate: NestedCreateAuthModifier<Self, I, U>.IntermediateKeyPath, _ user: NestedCreateAuthModifier<Self, I, U>.UserKeyPath ) -> NestedCreateAuthModifier<Self, I, U>Parameters
intermediateA
KeyPathto the intermediate property.userA
KeyPathto the related user property from the intermediate.Return Value
An instance of a
AuthModifierwith the suppliedKeyPathto the user.
CreateEndpoint Protocol Reference