Skip to content

请问自定义认证怎么返回自定义异常信息? #4

Description

@cemian

请问继承自AbstractPreparableIntegrationAuthenticator的自定义认证,比如短信认证,按照你的代码在prepare里进行验证码校验,不匹配则抛出OAuth2Exception异常,不过这个异常信息并不能返回给前端,response的结果为:
{
"error": "unauthorized",
"error_description": "Full authentication is required to access this resource"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions