essencebit / SignalRSwaggerGen

MIT License
70 stars 8 forks source link

Security Scheme hard coded to basic #27

Closed vishalpatel-te closed 1 year ago

vishalpatel-te commented 2 years ago

Is it possible to define the security scheme for the swagger? Instead of hard coding to basic, perhaps a parameter on SignalRHubAttribute to specify? https://github.com/Dorin-Mocan/SignalRSwaggerGen/blob/f400c31d6bd130618cdb650192bdf6caa87acfce/SignalRSwaggerGen/SignalRSwaggerGen/SignalRSwaggerGen.cs#L134

In .Net6, if we are using Bearer token for authentication, the Hub shows no documentation under authorize attribute.

Dorin-Mocan commented 2 years ago

@vishalpatel-te , I'll check and come back to you asap. Thanks!

Dorin-Mocan commented 2 years ago

@vishalpatel-te , hello! Could you please elaborate more on this statement? "In .Net6, if we are using Bearer token for authentication, the Hub shows no documentation under authorize attribute." What do you mean by "under authorize attribute"? As for specifying security scheme, I'm working on it and soon will make a release.

vishalpatel-te commented 2 years ago

@Dorin-Mocan I meant something like following: image

Dorin-Mocan commented 2 years ago

@vishalpatel-te , I am sorry, but I do not get what you mean. Please share more details(some code maybe, bigger screenshots, etc.). Thank you!

Dorin-Mocan commented 1 year ago

@vishalpatel-te , I released some time ago a new version that allows specifying a security scheme.