Skip to content

Add a method to verify if a claim is present, regardless of its value #360

Closed

Description

@LeafHacker

Describe the problem you'd like to have solved

I'd like to be able to verify that certain claims are present on a JWT, but I don't want have to limit its value.

Describe the ideal solution

A Verification method along the lines of withClaim(String name) which simply ensures the claim is present. Additionally withClaim(String name, Type type) which validates the claim is present and assignable to type would be nice.

Alternatives and current work-arounds

I don't have any work around currently, especially since the implementing class is final. Alternative names for the proposed method could be hasClaim, isPresent, requireClaim, etc, might make it clearer that the method is different to the other withClaims. Not sure if this is preferred vs sticking with a consistent name.

Activity

  1. added this to the v4-Next milestone on Feb 12, 2020
  2. stale commented on May 12, 2020

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

  3. lbalmaceda commented on May 14, 2020

    @lbalmaceda
    Contributor

    Tracking this internally on SDK-1416

  4. stale commented on Aug 13, 2020

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

  5. self-assigned this
    on Sep 18, 2020
  6. jimmyjames commented on Sep 28, 2020

    @jimmyjames
    Contributor

    The ability to verify a claim's presence regardless of value has been added in 3.11.0. If there is still demand to verify a claim by presence and type, please open a new issue so we can evaluate and discuss. Thanks!

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

Metadata

Metadata

Assignees

Labels

feature requestA feature has been asked for or suggested by the community

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions