From 0bd58d61e547f482dd3c38a30fccb4c58caf2a67 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Sat, 21 Aug 2021 04:16:45 +0200 Subject: Added introspection endpoint. (#16752) Co-authored-by: Lunny Xiao --- services/forms/user_form.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'services/forms') diff --git a/services/forms/user_form.go b/services/forms/user_form.go index 1e12795c70..7d6b976936 100644 --- a/services/forms/user_form.go +++ b/services/forms/user_form.go @@ -215,6 +215,17 @@ func (f *AccessTokenForm) Validate(req *http.Request, errs binding.Errors) bindi return middleware.Validate(errs, ctx.Data, f, ctx.Locale) } +// IntrospectTokenForm for introspecting tokens +type IntrospectTokenForm struct { + Token string `json:"token"` +} + +// Validate validates the fields +func (f *IntrospectTokenForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + // __________________________________________.___ _______ ________ _________ // / _____/\_ _____/\__ ___/\__ ___/| |\ \ / _____/ / _____/ // \_____ \ | __)_ | | | | | |/ | \/ \ ___ \_____ \ -- cgit v1.2.3