设置 url 使用 spring security rest 在 grails 中刷新令牌 JWT
set url to refresh token JWT in grails using spring security rest
我正在使用 spring 安全休息。实际上要使用此 url 刷新令牌 im:/oauth/access_token?grant_type=refresh_token&refresh_token=token
但是我正在使用 api 休息,我想使用 /api/oauth
来刷新令牌而不是 /oauth.
我尝试在 urlMappings
中重定向,但未找到响应 404。
"/api/oauth"(redirect: '/oauth')
"/api/oauth"(redirect: '/oauth')
如您所见,该映射将不起作用,但无论如何都没有充分的理由使用重定向。该插件提供了这样的映射:
"/oauth/access_token"(controller: 'restOauth', action: 'accessToken')
您可以将任何 url 您喜欢的内容映射到该控制器。你可以这样做...
"/api/oauth"(controller: 'restOauth', action: 'accessToken')
我正在使用 spring 安全休息。实际上要使用此 url 刷新令牌 im:/oauth/access_token?grant_type=refresh_token&refresh_token=token
但是我正在使用 api 休息,我想使用 /api/oauth
来刷新令牌而不是 /oauth.
我尝试在 urlMappings
中重定向,但未找到响应 404。
"/api/oauth"(redirect: '/oauth')
"/api/oauth"(redirect: '/oauth')
如您所见,该映射将不起作用,但无论如何都没有充分的理由使用重定向。该插件提供了这样的映射:
"/oauth/access_token"(controller: 'restOauth', action: 'accessToken')
您可以将任何 url 您喜欢的内容映射到该控制器。你可以这样做...
"/api/oauth"(controller: 'restOauth', action: 'accessToken')