MCPcopy
hub / github.com/ory/hydra / IsAny

Method IsAny

flow/flow.go:96–103  ·  view source on GitHub ↗
(expected ...State)

Source from the content-addressed store, hash-verified

94func (s State) LoginWasUsed() bool { return s == FlowStateLoginUsed || s == FlowStateLoginError }
95
96func (s State) IsAny(expected ...State) error {
97 for _, e := range expected {
98 if s == e {
99 return nil
100 }
101 }
102 return errors.Errorf("invalid flow state: expected one of %v, got %d", expected, s)
103}
104
105// Flow is an abstraction used in the persistence layer to unify LoginRequest,
106// HandledLoginRequest, ConsentRequest, and AcceptOAuth2ConsentRequest.

Callers 8

HandleLoginRequestMethod · 0.80
HandleLoginErrorMethod · 0.80
HandleConsentRequestMethod · 0.80
HandleConsentErrorMethod · 0.80

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected