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

Function DecodeAndInvalidateConsentVerifier

flow/flow_encoding.go:107–121  ·  view source on GitHub ↗
(ctx context.Context, d decodeDependencies, verifier string)

Source from the content-addressed store, hash-verified

105}
106
107func DecodeAndInvalidateConsentVerifier(ctx context.Context, d decodeDependencies, verifier string) (_ *Flow, err error) {
108 ctx, span := d.Tracer(ctx).Tracer().Start(ctx, "flow.DecodeAndInvalidateLoginVerifier")
109 defer otelx.End(span, &err)
110
111 f, err := decodeVerifier(ctx, d, verifier, consentVerifier)
112 if err != nil {
113 return nil, err
114 }
115
116 if err = f.InvalidateConsentRequest(); err != nil {
117 return nil, errors.WithStack(fosite.ErrInvalidRequest.WithDebug(err.Error()))
118 }
119
120 return f, nil
121}

Callers 2

verifyConsentMethod · 0.92

Calls 5

decodeVerifierFunction · 0.85
WithDebugMethod · 0.80
TracerMethod · 0.65
ErrorMethod · 0.45

Tested by 1