提交 65c687ea 编写于 作者: O o2null

Merge branch 'fix/jiraoauth' into 'wrdp'

增加oauth的jira token

See merge request o2oa/o2oa!2451
......@@ -71,6 +71,25 @@ public class OauthAction extends StandardJaxrsAction {
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
@JaxrsMethodDescribe(value = "POST方法实现oauth认证token方法", action = ActionToken.class)
@POST
@Path("token/jira")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes({ MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_FORM_URLENCODED, MediaType.APPLICATION_JSON })
public void postTokenJson(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
@Context HttpServletResponse response, @FormParam("code") String code,
@FormParam("grant_type") String grant_type) {
ActionResult<ActionToken.Wo> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
try {
result = new ActionToken().execute(effectivePerson, code, grant_type, MediaType.APPLICATION_JSON);
} catch (Exception e) {
logger.error(e, effectivePerson, request, null);
result.error(e);
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
@JaxrsMethodDescribe(value = "GET方法实现oauth认证token方法", action = ActionToken.class)
@GET
@Path("token")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册