Removed coupling with useless services in actions
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
dto "git.ego.freeddns.org/egommerce/api-entities/identity/dto"
|
||||
entity "git.ego.freeddns.org/egommerce/api-entities/identity/entity"
|
||||
domain "git.ego.freeddns.org/egommerce/identity-service/domain/repository"
|
||||
|
||||
@@ -116,8 +117,8 @@ func (a *AuthService) Register(email, login, passwd string) (string, error) {
|
||||
return id, nil
|
||||
}
|
||||
|
||||
func (a *AuthService) getTokenFromAuthorizationHeader(header string) (string, error) {
|
||||
split := strings.Split(header, " ")
|
||||
func (a *AuthService) GetTokenFromAuthorizationHeader(header *dto.AuthorizationHeaderDTO) (string, error) {
|
||||
split := strings.Split(header.Authorization, " ")
|
||||
if len(split) != 2 {
|
||||
return "", ErrParsingAccessToken
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user