Refactors repeated code for algorithm translation and class type to it's own variables.
Refactors repeated code for algorithm translation and class type to it's own variables.

jwt/ruby-jwt,excpt/ruby-jwt,progrium/ruby-jwt