import{formatResponse as e}from"../utils/responseData.mjs";import{ErrorHandler as t}from"../utils/errors/ErrorHandler.mjs";import{Request as n,Response as r}from"oauth2-server";const i=async(i,a)=>{let o=new n({headers:i.headers,method:i.method,query:i.query,body:i.body}),s=new r(a.raw);try{let t=e({data:await i.oauth.token(o,s)});return a.send(t)}catch(e){return t.handleAppErrorResponse(a,e)}};export{i as getOAuth2AccessToken};
//# sourceMappingURL=oAuth2.controller.mjs.map