Skip to content

Instantly share code, notes, and snippets.

@mczachurski
Last active March 4, 2018 07:53
Show Gist options
  • Save mczachurski/fea02c0b063fd4596fa3df94c7344439 to your computer and use it in GitHub Desktop.
Save mczachurski/fea02c0b063fd4596fa3df94c7344439 to your computer and use it in GitHub Desktop.
import Foundation
public protocol AuthorizationHandlerProtocol {
var requirementType: AuthorizationRequirementProtocol.Type { get }
var resourceType: EntityProtocol.Type { get }
func handle(user: UserCredentials, resource: EntityProtocol, requirement: AuthorizationRequirementProtocol) throws -> Bool
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment