Skip to content

Conversation

@tjadevries
Copy link

Implements feature request as described in issue #53

Add claims processing to MSALScheme
export default_claims_processing
Add claims processing to MSALAuthorization, so that it can be passed to MSALScheme
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements feature request #53 by adding support for custom token claims processing in the MSAL authentication scheme. The implementation allows for processing of token claims at the end of authentication with an optional callback function.

  • Added a claims_processing parameter to allow custom handling of token claims
  • Introduced a default_claims_processing function that extracts user info from token claims
  • Updated the authentication flow to call the claims processing function after token validation

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
fastapi_msal/security/msal_scheme.py Added claims processing functionality with default implementation and callback support
fastapi_msal/security/init.py Exported the new default_claims_processing function
fastapi_msal/auth.py Updated MSALAuth class to accept and pass through claims_processing parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant