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
Uis actually related to theQuerySubject.Declaration
Swift
public func auth<U: CorvusModelAuthenticatable>( _ user: AuthModifier<Self, U>.UserKeyPath ) -> AuthModifier<Self, U>Parameters
userA
KeyPathto the related user property.Return Value
An instance of a
AuthModifierwith 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: NestedAuthModifier<Self, I, U>.IntermediateKeyPath, _ user: NestedAuthModifier<Self, I, U>.UserKeyPath ) -> NestedAuthModifier<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.
AuthEndpoint Protocol Reference