fix:
This commit is contained in:
parent
331e413afa
commit
ba26d05516
3 changed files with 11 additions and 6 deletions
6
Makefile
6
Makefile
|
@ -1,3 +1,6 @@
|
|||
tag = latest
|
||||
|
||||
|
||||
gen:
|
||||
@buf generate
|
||||
dev:
|
||||
|
@ -6,4 +9,5 @@ dev:
|
|||
|
||||
build:
|
||||
@make gen
|
||||
# TODO: build dockerfile
|
||||
@docker build . -t ms-auth:${tag}
|
||||
@#docker push ms-auth:${tag}
|
||||
|
|
|
@ -51,10 +51,11 @@ func (s *SessionService) Create(ctx context.Context, handle, password string) (*
|
|||
return nil, err
|
||||
}
|
||||
|
||||
err = s.sessionProvider.CreateSession(ctx, *user.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
//err = s.sessionProvider.CreateSession(ctx, *user.Id)
|
||||
//if err != nil {
|
||||
// return nil, err
|
||||
//}
|
||||
s.sessionProvider.CreateSession(ctx, *user.Id) // FIXME
|
||||
|
||||
session, err := s.sessionProvider.ReadSessionByUserId(ctx, *user.Id)
|
||||
if err != nil {
|
||||
|
|
|
@ -15,7 +15,7 @@ func (s *AuthServer) AuthInterceptor() grpc.UnaryServerInterceptor {
|
|||
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
reqWithToken, ok := req.(ReqWithToken)
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "")
|
||||
return handler(ctx, req)
|
||||
}
|
||||
token := reqWithToken.GetToken()
|
||||
|
||||
|
|
Loading…
Reference in a new issue