File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
course-04/project/c4-final-project-starter-code/backend/src/lambda Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ import { JwtPayload } from '../../auth/JwtPayload'
9
9
10
10
const logger = createLogger ( 'auth' )
11
11
12
- const jwksUrl = 'https://test-endpoint.auth0.com/.well-known/jwks.json'
12
+ // TODO: Provide a URL that can be used to download a certificate that can be used
13
+ // to verify JWT token signature.
14
+ // To get this URL you need to go to an Auth0 page -> Show Advanced Settings -> Endpoints -> JSON Web Key Set
15
+ const jwksUrl = '...'
13
16
14
17
export const handler = async (
15
18
event : CustomAuthorizerEvent
@@ -56,6 +59,8 @@ async function verifyToken(authHeader: string): Promise<JwtPayload> {
56
59
const jwt : Jwt = decode ( token , { complete : true } ) as Jwt
57
60
58
61
// TODO: Implement token verification
62
+ // You should implement it similarly to how it was implemented for the exercise for the lesson 5
63
+ // You can read more about how to do this here: https://auth0.com/blog/navigating-rs256-and-jwks/
59
64
return undefined
60
65
}
61
66
Original file line number Diff line number Diff line change @@ -3,9 +3,8 @@ import 'source-map-support/register'
3
3
import { APIGatewayProxyEvent , APIGatewayProxyResult , APIGatewayProxyHandler } from 'aws-lambda'
4
4
5
5
export const handler : APIGatewayProxyHandler = async ( event : APIGatewayProxyEvent ) : Promise < APIGatewayProxyResult > => {
6
- const todoId = event . pathParameters . todoId
6
+ const todoId = event . pathParameters . todoId
7
7
8
- // TODO: Remove a TODO item by id
9
- return undefined
10
- }
11
- )
8
+ // TODO: Remove a TODO item by id
9
+ return undefined
10
+ }
You can’t perform that action at this time.
0 commit comments