Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to fetch list of user's permissions #127

Open
pbolduc opened this issue Aug 1, 2024 · 1 comment
Open

Add function to fetch list of user's permissions #127

pbolduc opened this issue Aug 1, 2024 · 1 comment
Labels
question Further information is requested waiting for feedback

Comments

@pbolduc
Copy link

pbolduc commented Aug 1, 2024

We have a number of applications that use bespoke versions of the keycloak authorization code in .NET to do policy enforcement. I would like to migrate to use your library. However, we have a requirement to be able to fetch the user's current permissions. These permissions are fetched from the web UI application via an authenticated API. The permissions are used for security/feature trimming based on the permissions. The data access and update APIs are still protected with policy enforcement.

I have an implementation that fetches the user's permssions. This function returns a list of resources and the associated scopes.

public record Resource
{
    public string Id { get; set; } = string.Empty;
    public string Name { get; set; } = string.Empty;

    public string[] Scopes { get; set; } = [];
}

I would like to submit a pull request with these changes to your repository. Where should I add this code. It would seem logical to add a method to IAuthorizationServerClient / AuthorizationServerClient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested waiting for feedback
Projects
None yet
Development

No branches or pull requests

2 participants