Skip to content

pbaletkeman/litestarOKTA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Litestar OKTA Python App

This is a barebones example which implements OKTA to secure Litestar APIs. See https://dev.to/pbaletkeman/secure-litestar-apis-with-okta-570l for a write up on this.

Run command:

litestar --app lite:app run

OpenAPI Sites:

Authorization Header Note

To use ONLY authorization header for authentication change:

async def login_handler(data: Credentials, request: "Request[Any, Any, Any]") -> "Response[OAuth2Login]":

to

async def login_handler(request: "Request[Any, Any, Any]") -> "Response[OAuth2Login]":

and remove the

if data.client_id and data.client_secret:

checks. If you do this then you can use the Authorize button in swagger as well in other integration/setups.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages