Connector Update
This commit is contained in:
parent
73fe3a3c9a
commit
0b06c252a3
|
|
@ -9,7 +9,7 @@ declare global
|
|||
{
|
||||
namespace Express
|
||||
{
|
||||
interface Request { auth?: AuthPayload; }
|
||||
interface Request { auth?: AuthPayload; rawToken?: string; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -101,6 +101,7 @@ export function jwtMiddleware( req: Request, res: Response, next: NextFunction )
|
|||
try
|
||||
{
|
||||
req.auth = jwt.verify( token, JWT_SECRET ) as AuthPayload;
|
||||
req.rawToken = token;
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
|
@ -137,6 +138,7 @@ export function jwtMiddleware( req: Request, res: Response, next: NextFunction )
|
|||
try
|
||||
{
|
||||
req.auth = jwt.verify( result.accessToken, JWT_SECRET ) as AuthPayload;
|
||||
req.rawToken = result.accessToken;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
|
||||
<div class="card">
|
||||
<h3>In your service repo</h3>
|
||||
<pre><code>git submodule add https://community.rokojori.com/Rokojori/rokojori-auth-connector.git source/auth-connector
|
||||
<pre><code>git submodule add git@community.rokojori.com:Rokojori/rokojori-auth-connector.git source/auth-connector
|
||||
git submodule update --init</code></pre>
|
||||
<p style="margin-top:0.75rem">
|
||||
This creates <code>source/auth-connector/</code> inside your service repo.
|
||||
|
|
|
|||
Loading…
Reference in New Issue