Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #96 from nodes-vapor/feature/loginable-less-constr…
Browse files Browse the repository at this point in the history
…ained

Loosened constraints on Loginable to make user type a little more fle…
  • Loading branch information
rasmusebbesen authored May 14, 2019
2 parents 8aa0467 + 36f698e commit 7e02f45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/Sugar/Authentication/Loginable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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`.
Expand Down

0 comments on commit 7e02f45

Please sign in to comment.