From 36f698ebfe1897c2653f65be160f771fce4e6d47 Mon Sep 17 00:00:00 2001 From: Rasmus Ebbesen Date: Tue, 14 May 2019 09:54:15 +0200 Subject: [PATCH] Loosened constraints on Loginable to make user type a little more flexible --- Sources/Sugar/Authentication/Loginable.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/Sugar/Authentication/Loginable.swift b/Sources/Sugar/Authentication/Loginable.swift index 21d95ee..d6bf043 100644 --- a/Sources/Sugar/Authentication/Loginable.swift +++ b/Sources/Sugar/Authentication/Loginable.swift @@ -5,7 +5,7 @@ import Vapor public protocol Loginable { /// Payload containing the information required to perform a login. - associatedtype Login: HasReadablePassword + associatedtype Login /// Used to perform any pre-login steps such as validation. /// @@ -33,7 +33,8 @@ extension Loginable { extension Loginable where Self: PasswordAuthenticatable, - Self.Login: HasReadableUsername + Self.Login: HasReadableUsername, + Self.Login: HasReadablePassword { /// Default implementation that uses functionality provided by `PasswordAuthenticatable`. /// See `Loginable`.