StaffCoder
.NET
.NET.NET 10
12 modules · 48 challengesSign up
Modules12 modules · 48 challenges
Learn how an API decides who a caller is and what they may reach: validating a bearer token against the issuer, audience, signature and expiry it is configured with, gating routes with a named policy rather than a check inside the handler, and writing a custom requirement that judges a caller from their own claims
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Jwt Protected Endpoints

Sign up to unlock
—No data yetmedium
About this challenge

This problem covers letting a web application answer only the callers who arrive with a signed pass it trusts, turning everyone else away, and handing the caller's own details to the code that answers them.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Policy-Gated Admin Area

Sign up to unlock
—No data yetmedium
About this challenge

This problem covers letting only the people who hold an administrator role into the admin part of an API, while everyone else who is signed in keeps the rest of it and a caller with no sign-in is asked to sign in first.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Minimum Tenure Requirement

Sign up to unlock
—No data yetmedium
About this challenge

This problem covers letting a set of payroll pages be opened only by staff who have been with the company long enough, working that out from the hire date the caller's sign-in carries and turning everyone else away without an error.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Multi-Tier Access API

STAR
Solving it completes the module
100%1 of 1 solvedmedium
About this challenge

This problem covers letting one API serve four kinds of page at once, one open to everybody, one to anybody signed in, one to a named group of staff and one only to staff who have been there long enough, and answering every other caller with the right refusal.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.