Refactored the Auth api to change the AuthMethod to have more descriptive auth methods of Basic and Bearer
Added a new Enum JWTPlugin which give descriptive names to the Wordpress plugin by the name of the author of plugin
The method signatures for Auth are same as the previous implementation of the library
The default selection for the Auth method is Bearer which was previously JWT (plugin by Enrique Chavez)
The default selection for the JWT plugin is Enrique Chavez auth plugin - same as the previous implementation.
There is an additional property on WorpdressClient which is JWTPlugin. So, the configuration can be compared as:
//previous configuration
var client = new WordpressClient(wordpressUri) {
AuthMethod = AuthMethod.JWT
};
//new configuration
var client = new WordpressClient(wordpressUri) {
AuthMethod = AuthMethod.Bearer,
JWTPlugin = JWTPlugin.JWTAuthByEnriqueChavez
}
//new configuration will default to Enrique Chavez's plugin
//this will behave as the previous configuration
var client = new WordpressClient(wordpressUri) {
AuthMethod = AuthMethod.Bearer
}
This PR doesn't include the changes for general JWT auth plugin. I will include it in another PR because that will be an add-on rather than a refactoring.
Refactored the Auth api to change the
AuthMethod
to have more descriptive auth methods ofBasic
andBearer
Added a new EnumJWTPlugin
which give descriptive names to the Wordpress plugin by the name of the author of plugin The method signatures for Auth are same as the previous implementation of the library The default selection for the Auth method isBearer
which was previouslyJWT
(plugin by Enrique Chavez) The default selection for the JWT plugin is Enrique Chavez auth plugin - same as the previous implementation. There is an additional property onWorpdressClient
which isJWTPlugin
. So, the configuration can be compared as:This PR doesn't include the changes for general JWT auth plugin. I will include it in another PR because that will be an add-on rather than a refactoring.