azure-activedirectory-identitymodel-extensions-for-dotnet icon indicating copy to clipboard operation
azure-activedirectory-identitymodel-extensions-for-dotnet copied to clipboard

Consider adding more base methods to TokenHandler

Open kevinchalet opened this issue 4 years ago • 5 comments

TokenHandler seems pretty useless as a base class, as it doesn't expose any useful method for token generation or validation.

Please consider adding abstract or virtual properties/methods for at least the following APIs:

  • Type TokenType { get; }
  • bool CanReadToken(string token)
  • string CreateToken(SecurityTokenDescriptor tokenDescriptor)
  • TokenValidationResult ValidateToken(string token, TokenValidationParameters validationParameters)

kevinchalet avatar Sep 30 '19 19:09 kevinchalet

@PinpointTownes we agree and want to do this work in our 6.x so we can easily have asp.net 3.x take a dependency.

brentschmaltz avatar Oct 01 '19 05:10 brentschmaltz

@kevinchalet CreateToken(SecurityTokenDescriptor ...) is defined to return by SecurityTokenHandler to return SecurityToken. I agree this method would be helpful to return a string. Perhaps a different name.

brentschmaltz avatar Aug 13 '20 00:08 brentschmaltz

@kevinchalet sorry we missed this one for Wilson7. Will keep it on the radar for Wilson8 (no ETA)

jennyf19 avatar Sep 19 '23 21:09 jennyf19