-
-
Notifications
You must be signed in to change notification settings - Fork 964
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement account recovery skeleton
This patch implements the account recovery request skeleton with endpoints such as "Init Account Recovery", a new config value `urls�.recovery_ui` and so on. Additionally, some refactoring was made to DRY code and make naming consistent. See #37 BREAKING CHANGEs: The field `identity.addresses` has moved to `identity.verifiable_addresses`. A new field has been added `identity.recovery_addresses`. Configuration key `selfservice.verify` was renamed to `selfservice.verification`. Configuration key `selfservice.verification.link_lifespan` has been merged with `selfservice.verification.request_lifespan`.
- Loading branch information
Showing
79 changed files
with
2,951 additions
and
252 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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package driver | ||
|
||
import ( | ||
"github.com/ory/kratos/selfservice/flow/recovery" | ||
) | ||
|
||
func (m *RegistryDefault) RecoveryRequestErrorHandler() *recovery.ErrorHandler { | ||
if m.selfserviceRecoveryErrorHandler == nil { | ||
m.selfserviceRecoveryErrorHandler = recovery.NewErrorHandler(m, m.c) | ||
} | ||
|
||
return m.selfserviceRecoveryErrorHandler | ||
} | ||
|
||
func (m *RegistryDefault) RecoveryHandler() *recovery.Handler { | ||
if m.selfserviceRecoveryHandler == nil { | ||
m.selfserviceRecoveryHandler = recovery.NewHandler(m, m.c) | ||
} | ||
|
||
return m.selfserviceRecoveryHandler | ||
} | ||
|
||
func (m *RegistryDefault) RecoverySender() *recovery.Sender { | ||
if m.selfserviceRecoverySender == nil { | ||
m.selfserviceRecoverySender = recovery.NewSender(m, m.c) | ||
} | ||
|
||
return m.selfserviceRecoverySender | ||
} | ||
|
||
func (m *RegistryDefault) RecoveryStrategies() recovery.Strategies { | ||
if len(m.recoveryStrategies) == 0 { | ||
for _, strategy := range m.selfServiceStrategies() { | ||
if s, ok := strategy.(recovery.Strategy); ok { | ||
m.recoveryStrategies = append(m.recoveryStrategies, s) | ||
} | ||
} | ||
} | ||
return m.recoveryStrategies | ||
} |
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
Oops, something went wrong.