-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drastic improvement to forming auth handlers
- Loading branch information
1 parent
53bb103
commit 9d5507e
Showing
16 changed files
with
378 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.lightningkite.lightningserver.auth.proof | ||
|
||
import com.lightningkite.lightningdb.HasId | ||
import com.lightningkite.lightningserver.auth.Authentication | ||
import com.lightningkite.lightningserver.core.ServerPath | ||
import com.lightningkite.lightningserver.core.ServerPathGroup | ||
|
@@ -28,19 +29,12 @@ class EmailProofEndpoints( | |
val emailTemplate: suspend (String, String) -> Email, | ||
proofHasher: () -> SecureHasher = secretBasis.hasher("proof"), | ||
val verifyEmail: suspend (String) -> Boolean = { true }, | ||
) : PinBasedProofEndpoints(path, proofHasher, pin) { | ||
) : PinBasedProofEndpoints(path, "email", "email", proofHasher, pin) { | ||
init { | ||
if (path.docName == null) path.docName = "EmailProof" | ||
Authentication.register(this) | ||
} | ||
|
||
override val name: String | ||
get() = "email" | ||
override val humanName: String | ||
get() = "Email" | ||
override val strength: Int | ||
get() = 10 | ||
override val validates: String | ||
get() = "email" | ||
override val exampleTarget: String | ||
get() = "[email protected]" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.