mirror of
https://github.com/teamhanko/hanko.git
synced 2025-10-29 23:59:46 +08:00
This pull request introduces the new Flowpilot system along with several new features and various improvements. The key enhancements include configurable authorization, registration, and profile flows, as well as the ability to enable and disable user identifiers (e.g., email addresses and usernames) and login methods. --------- Co-authored-by: Frederic Jahn <frederic.jahn@hanko.io> Co-authored-by: Lennart Fleischmann <lennart.fleischmann@hanko.io> Co-authored-by: lfleischmann <67686424+lfleischmann@users.noreply.github.com> Co-authored-by: merlindru <hello@merlindru.com>
30 lines
770 B
Go
30 lines
770 B
Go
package flowpilot
|
|
|
|
import (
|
|
"encoding/json"
|
|
"github.com/teamhanko/hanko/backend/flowpilot/jsonmanager"
|
|
)
|
|
|
|
type actionInput interface {
|
|
jsonmanager.JSONManager
|
|
}
|
|
|
|
type readOnlyActionInput interface {
|
|
jsonmanager.ReadOnlyJSONManager
|
|
}
|
|
|
|
// newActionInput creates a new instance of actionInput with empty JSON data.
|
|
func newActionInput() actionInput {
|
|
return jsonmanager.NewJSONManager()
|
|
}
|
|
|
|
// newActionInputFromInputData creates a new instance of actionInput with the given JSON data
|
|
// which was previously unmarshalled into a generic map.
|
|
func newActionInputFromInputData(data InputData) (actionInput, error) {
|
|
dataBytes, err := json.Marshal(data.InputDataMap)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return jsonmanager.NewJSONManagerFromString(string(dataBytes))
|
|
}
|