Skip to content

Commit 3a55d02

Browse files
committed
Rename core-go/auth to core-go/authentication
1 parent 1246ded commit 3a55d02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+71
-73
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
Please make sure to initialize a Go module before installing core-go/auth:
1111

1212
```shell
13-
go get -u github.com/core-go/auth
13+
go get -u github.com/core-go/authentication
1414
```
1515

1616
Import:
1717
```go
18-
import "github.com/core-go/auth"
18+
import "github.com/core-go/authentication"
1919
```
2020

2121
## Models

azure/azure.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"fmt"
88
"strings"
99

10-
"github.com/core-go/auth"
10+
auth "github.com/core-go/authentication"
1111
"github.com/golang-jwt/jwt"
1212
"github.com/lestrrat-go/jwx/jwa"
1313
"github.com/lestrrat-go/jwx/jwk"
@@ -42,14 +42,16 @@ func NewAzureAuthenticator(
4242
config Config,
4343
tokenConfig auth.TokenConfig,
4444
privileges func(ctx context.Context, id string) ([]auth.Privilege, error),
45-
id string,
45+
id string,
4646
) *Authenticator {
4747
if len(id) == 0 {
4848
id = "id"
4949
}
50-
return &Authenticator{getUserByToken, userPort,privileges, generateToken, tokenConfig, config, id}
50+
return &Authenticator{getUserByToken, userPort, privileges, generateToken, tokenConfig, config, id}
5151
}
52+
5253
const expired = "Token is expired"
54+
5355
// Authenticate authorization jwt here doesn't contain prefix bearer
5456
func (a Authenticator) Authenticate(ctx context.Context, authorization string) (*auth.UserAccount, bool, error) {
5557
if len(authorization) == 0 {

azure/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/core-go/auth"
12+
auth "github.com/core-go/authentication"
1313
)
1414

1515
const internalServerError = "Internal Server Error"

azure/sql/user_repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"database/sql"
66
"fmt"
7-
"github.com/core-go/auth/azure"
7+
"github.com/core-go/authentication/azure"
88
"reflect"
99
"strconv"
1010
"strings"

cassandra/user_repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strings"
88
"time"
99

10-
a "github.com/core-go/auth"
10+
a "github.com/core-go/authentication"
1111
"github.com/gocql/gocql"
1212
)
1313

dynamodb/user_repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/aws/aws-sdk-go/service/dynamodb"
88
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
99
"github.com/aws/aws-sdk-go/service/dynamodb/expression"
10-
"github.com/core-go/auth"
10+
auth "github.com/core-go/authentication"
1111
"reflect"
1212
"strconv"
1313
"strings"

echo/authencation_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"encoding/json"
66
"errors"
7-
a "github.com/core-go/auth"
7+
a "github.com/core-go/authentication"
88
"github.com/labstack/echo/v4"
99
"net"
1010
"net/http"

echo/privileges_by_entity_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package echo
22

33
import (
44
"context"
5-
a "github.com/core-go/auth"
5+
a "github.com/core-go/authentication"
66
"github.com/labstack/echo/v4"
77
"net/http"
88
"strings"

echo/privileges_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package echo
22

33
import (
44
"context"
5-
a "github.com/core-go/auth"
5+
a "github.com/core-go/authentication"
66
"github.com/labstack/echo/v4"
77
"net/http"
88
)

echo_v3/authencation_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"encoding/json"
66
"errors"
7-
a "github.com/core-go/auth"
7+
a "github.com/core-go/authentication"
88
"github.com/labstack/echo"
99
"net"
1010
"net/http"

0 commit comments

Comments
 (0)