Skip to content

Commit

Permalink
upgrade to auth-lib v3 [#346]
Browse files Browse the repository at this point in the history
  • Loading branch information
roberlander2 committed Mar 16, 2023
1 parent 8c206fb commit ce118f9
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 679 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ COPY --from=builder /groups-app/driver/web/authorization_policy.csv /driver/web/
COPY --from=builder /groups-app/driver/web/permissions_authorization_policy.csv /driver/web/permissions_authorization_policy.csv
COPY --from=builder /groups-app/driver/web/scope_authorization_policy.csv /driver/web/scope_authorization_policy.csv

COPY --from=builder /groups-app/vendor/github.com/rokwire/core-auth-library-go/v2/authorization/authorization_model_scope.conf /groups-app/vendor/github.com/rokwire/core-auth-library-go/v2/authorization/authorization_model_scope.conf
COPY --from=builder /groups-app/vendor/github.com/rokwire/core-auth-library-go/v2/authorization/authorization_model_string.conf /groups-app/vendor/github.com/rokwire/core-auth-library-go/v2/authorization/authorization_model_string.conf
COPY --from=builder /groups-app/vendor/github.com/rokwire/core-auth-library-go/v3/authorization/authorization_model_scope.conf /groups-app/vendor/github.com/rokwire/core-auth-library-go/v3/authorization/authorization_model_scope.conf
COPY --from=builder /groups-app/vendor/github.com/rokwire/core-auth-library-go/v3/authorization/authorization_model_string.conf /groups-app/vendor/github.com/rokwire/core-auth-library-go/v3/authorization/authorization_model_string.conf

COPY --from=builder /etc/passwd /etc/passwd

Expand Down
4 changes: 2 additions & 2 deletions core/administration.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"time"

"github.com/google/uuid"
"github.com/rokwire/core-auth-library-go/v2/authutils"
"github.com/rokwire/core-auth-library-go/v2/tokenauth"
"github.com/rokwire/core-auth-library-go/v3/authutils"
"github.com/rokwire/core-auth-library-go/v3/tokenauth"
"github.com/rokwire/logging-library-go/v2/errors"
"github.com/rokwire/logging-library-go/v2/logutils"
)
Expand Down
2 changes: 1 addition & 1 deletion core/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"groups/utils"
"time"

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

// Services exposes APIs for the driver adapters
Expand Down
2 changes: 1 addition & 1 deletion driven/corebb/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"net/http"
"strings"

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

// Adapter implements the Core interface
Expand Down
2 changes: 1 addition & 1 deletion driven/notifications/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"log"
"net/http"

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

// Adapter implements the Notifications interface
Expand Down
2 changes: 1 addition & 1 deletion driver/web/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"net/http"

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

"github.com/gorilla/mux"

Expand Down
8 changes: 4 additions & 4 deletions driver/web/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
"golang.org/x/sync/syncmap"

"github.com/casbin/casbin"
"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/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/authutils"
"github.com/rokwire/core-auth-library-go/v3/tokenauth"
)

// Auth handler
Expand Down
4 changes: 2 additions & 2 deletions driver/web/rest/adminapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strings"

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

Expand Down
51 changes: 26 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,52 @@ go 1.20

require (
github.com/casbin/casbin v1.9.1
github.com/coreos/go-oidc/v3 v3.4.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/coreos/go-oidc/v3 v3.5.0
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/robfig/cron/v3 v3.0.1
github.com/rokwire/core-auth-library-go/v2 v2.2.0
github.com/rokwire/core-auth-library-go/v3 v3.0.1
github.com/rokwire/logging-library-go/v2 v2.2.0
github.com/swaggo/http-swagger v1.3.3
github.com/swaggo/swag v1.8.8
go.mongodb.org/mongo-driver v1.11.0
github.com/swaggo/swag v1.8.10
go.mongodb.org/mongo-driver v1.11.2
golang.org/x/sync v0.1.0
gopkg.in/go-playground/validator.v9 v9.31.0
)

require (
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/casbin/casbin/v2 v2.60.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/spec v0.20.7 // indirect
github.com/casbin/casbin/v2 v2.65.2 // indirect
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/spec v0.20.8 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.15.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/leodido/go-urn v1.2.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/montanaflynn/stats v0.6.6 // indirect
github.com/montanaflynn/stats v0.7.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/swaggo/files v1.0.0 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/oauth2 v0.2.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/tools v0.3.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit ce118f9

Please sign in to comment.