Skip to content

Commit

Permalink
update module version to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
shurwit committed Mar 10, 2023
1 parent 301665c commit 05fc0af
Show file tree
Hide file tree
Showing 23 changed files with 51 additions and 55 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Auth library for validation of Core Building Block auth tokens
## Installation
To install this package, use `go get`:

go get github.com/rokwire/core-auth-library-go/v2
go get github.com/rokwire/core-auth-library-go/v3

This will then make the following packages available to you:

Expand Down
2 changes: 1 addition & 1 deletion authorization/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"

"github.com/casbin/casbin/v2"
"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v3/authutils"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions authservice/auth_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"sync"
"time"

"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v3/authutils"
"github.com/rokwire/core-auth-library-go/v3/keys"
"golang.org/x/sync/syncmap"
"gopkg.in/go-playground/validator.v9"
)
Expand Down
8 changes: 4 additions & 4 deletions authservice/auth_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"reflect"
"testing"

"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v2/internal/testutils"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/authutils"
"github.com/rokwire/core-auth-library-go/v3/internal/testutils"
"github.com/rokwire/core-auth-library-go/v3/keys"
)

func setupSampleServiceRegSubscriptions() *authservice.ServiceRegSubscriptions {
Expand Down
2 changes: 1 addition & 1 deletion authservice/mocks/ServiceAccountLoader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion authservice/mocks/ServiceRegLoader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion authutils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"testing"

"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v3/authutils"
)

func TestHashSha256(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions coreservice/core_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"net/http"
"time"

"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/authutils"
"github.com/rokwire/logging-library-go/v2/logs"
)

Expand Down
4 changes: 2 additions & 2 deletions example/coreservice/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package main
import (
"log"

"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/coreservice"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/coreservice"
"github.com/rokwire/logging-library-go/v2/logs"
)

Expand Down
2 changes: 1 addition & 1 deletion example/envloader/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/rokwire/core-auth-library-go/v2/envloader"
"github.com/rokwire/core-auth-library-go/v3/envloader"
"github.com/rokwire/logging-library-go/v2/logs"
)

Expand Down
8 changes: 4 additions & 4 deletions example/signature/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"log"
"net/http"

"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/internal/testutils"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v2/sigauth"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/internal/testutils"
"github.com/rokwire/core-auth-library-go/v3/keys"
"github.com/rokwire/core-auth-library-go/v3/sigauth"
)

// WebAdapter is the web adapter for signature auth
Expand Down
6 changes: 3 additions & 3 deletions example/token/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"net/http"
"strings"

"github.com/rokwire/core-auth-library-go/v2/authorization"
"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/tokenauth"
"github.com/rokwire/core-auth-library-go/v3/authorization"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/tokenauth"
)

// WebAdapter is the web adapter for token auth
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/rokwire/core-auth-library-go/v2
module github.com/rokwire/core-auth-library-go/v3

go 1.20

Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/aws/aws-sdk-go v1.44.215 h1:K3KERfO6MaV349idub2w1u1H0R0KSkED0LshPnaAn3Q=
github.com/aws/aws-sdk-go v1.44.215/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.44.218 h1:p707+xOCazWhkSpZOeyhtTcg7Z+asxxvueGgYPSitn4=
github.com/aws/aws-sdk-go v1.44.218/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/casbin/casbin/v2 v2.65.0 h1:VC/WAX7Aqqx5FZSToGhkC8Mw9veg9K5PThUd71szi5c=
github.com/casbin/casbin/v2 v2.65.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
github.com/casbin/casbin/v2 v2.65.1 h1:T4vuP+rQvaBcGM/FqvwnJKvVz6N4nLKmLsvk8E+ZTF4=
github.com/casbin/casbin/v2 v2.65.1/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down
6 changes: 3 additions & 3 deletions internal/testutils/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package testutils
import (
"fmt"

"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/authservice/mocks"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/authservice/mocks"
"github.com/rokwire/core-auth-library-go/v3/keys"
)

// GetSampleRSAPubKeyPem returns a sample RSA public key PEM
Expand Down
2 changes: 1 addition & 1 deletion keys/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"io"

"github.com/golang-jwt/jwt"
"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v3/authutils"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions keys/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"encoding/base64"
"testing"

"github.com/rokwire/core-auth-library-go/v2/internal/testutils"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v3/internal/testutils"
"github.com/rokwire/core-auth-library-go/v3/keys"
)

func setupPubKeyFromPem(pem string) *keys.PubKey {
Expand Down
6 changes: 3 additions & 3 deletions sigauth/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"strings"
"time"

"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/authutils"
"github.com/rokwire/core-auth-library-go/v3/keys"
"gopkg.in/go-playground/validator.v9"
)

Expand Down
10 changes: 5 additions & 5 deletions sigauth/signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (
"strconv"
"testing"

"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/authservice/mocks"
"github.com/rokwire/core-auth-library-go/v2/internal/testutils"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v2/sigauth"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/authservice/mocks"
"github.com/rokwire/core-auth-library-go/v3/internal/testutils"
"github.com/rokwire/core-auth-library-go/v3/keys"
"github.com/rokwire/core-auth-library-go/v3/sigauth"
)

func setupTestSignatureAuth(authService *authservice.AuthService, mockLoader *mocks.ServiceRegLoader) (*sigauth.SignatureAuth, error) {
Expand Down
8 changes: 4 additions & 4 deletions tokenauth/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"time"

"github.com/golang-jwt/jwt"
"github.com/rokwire/core-auth-library-go/v2/authorization"
"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v3/authorization"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/authutils"
"github.com/rokwire/core-auth-library-go/v3/keys"
)

const (
Expand Down
14 changes: 7 additions & 7 deletions tokenauth/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import (
"time"

"github.com/golang-jwt/jwt"
"github.com/rokwire/core-auth-library-go/v2/authorization"
"github.com/rokwire/core-auth-library-go/v2/authservice"
"github.com/rokwire/core-auth-library-go/v2/authservice/mocks"
"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v2/internal/testutils"
"github.com/rokwire/core-auth-library-go/v2/keys"
"github.com/rokwire/core-auth-library-go/v2/tokenauth"
"github.com/rokwire/core-auth-library-go/v3/authorization"
"github.com/rokwire/core-auth-library-go/v3/authservice"
"github.com/rokwire/core-auth-library-go/v3/authservice/mocks"
"github.com/rokwire/core-auth-library-go/v3/authutils"
"github.com/rokwire/core-auth-library-go/v3/internal/testutils"
"github.com/rokwire/core-auth-library-go/v3/keys"
"github.com/rokwire/core-auth-library-go/v3/tokenauth"
)

func setupTestTokenAuth(authService *authservice.AuthService, acceptRokwire bool, mockLoader *mocks.ServiceRegLoader) (*tokenauth.TokenAuth, error) {
Expand Down
2 changes: 1 addition & 1 deletion webauth/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"net/url"
"time"

"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v3/authutils"
"github.com/rs/cors"
)

Expand Down
2 changes: 1 addition & 1 deletion webauth/web_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"
"time"

"github.com/rokwire/core-auth-library-go/v2/webauth"
"github.com/rokwire/core-auth-library-go/v3/webauth"
)

func TestCheckOrigin(t *testing.T) {
Expand Down

0 comments on commit 05fc0af

Please sign in to comment.