Skip to content

Commit

Permalink
Updated signature of NewPS512Manager (#34)
Browse files Browse the repository at this point in the history
NewPS512Manager now returns a pointer of the PS512Manager.

This is due to the fact that all functions of this manager uses
pointer receivers
  • Loading branch information
qqiao committed Apr 7, 2022
1 parent e744d3a commit 98856d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jwt/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ rxYt4E6zaoD1Ix9YXh2bKocCAwEAAQ==

testCases = []testCase{
{
manager: &ps512,
manager: ps512,
expected: "1",
token: `eyJhbGciOiJQUzUxMiIsInR5cCI6IkpXVCJ9.eyJkYXQiOiIxIiwiZXhwIjoyNTM0MDIyNzE5OTl9.acGc_2bhg9ELH0YCumW8BBrsI7nNXUw2CJWMOJVRXbYCGY3BvKBWkNKFuy-q_zRZ8RDlN1qI0oKokakHxk_94Gg8x7ttJbVg5-dysL3hhS0E5eZGpX40ujSSqW5s1bctBjOjAFU9weR7DKSqznglMgUL6_K11I2F8ZG3aTTtc8wFMN3D1wplqiw3RhbLbsyFJx8p2ZEokIzofNP7SIUcmKyXuVx9_me9BRdfTH8mwJ4miSfyW8Aq9vASGWYb8TDuTlPi4yGTrzzjvzdG8OLyfkoK4oaK_6uW2ZzAwkXFjMLiy1RuRkj36aH5IOGSoBdS8ns32wfeOu8mTOzn_dOa2ztIQD_iwX5z-3kcx_v1emAzvsPro7p6yPjE75Z5qU0rw7EgHYvCigg96hLs1ghNRHFN4Xx5ahMl4dqDJPA0L6EQsj80mqfDgAJ7285jYpZs28X7Ij19fqRoVw-fvsj_zcEI4WJnhapY9pbiOwbh8EUxtltgW3IiPzKLohgAF8JZ6rnnJJqOWi9TGbknfeLh6cXkohWMTlk8q6uu9g25SLdravvCUReFvIkJYIukO2y8wDPTlB9gOR9uQcdTKn-Wr6G43GS05hhappKjotAqxuvlaMEdaVHh_Qr1fLcy7erMd69irR7dbMsfZ5BriEyWE9OTAr8Ano7qoXMZlqt-37Q`,
dat: []string{"1", "中文"},
Expand Down
4 changes: 2 additions & 2 deletions jwt/ps512_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ type PS512Manager struct {

// NewPS512Manager creates a new JWT client that signs and validates JWT tokens
// using the PS512 algorithm.
func NewPS512Manager(publicKey *rsa.PublicKey, privateKey *rsa.PrivateKey) PS512Manager {
return PS512Manager{
func NewPS512Manager(publicKey *rsa.PublicKey, privateKey *rsa.PrivateKey) *PS512Manager {
return &PS512Manager{
parseKey: publicKey,
signingKey: privateKey,

Expand Down

0 comments on commit 98856d9

Please sign in to comment.