X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fsecurityapi%2Ftypevalidation.go;fp=capifcore%2Finternal%2Fsecurityapi%2Ftypevalidation.go;h=1241f96fff0507b5d22142971588b69e51a17eb8;hb=4308df0663b45eb9d95b3babdf519a06ee76c15a;hp=90dbda36fde30f8106bee211545c94178311a450;hpb=1a36c0f848111d82bf58552662f7bff3b05f79ed;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/securityapi/typevalidation.go b/capifcore/internal/securityapi/typevalidation.go index 90dbda3..1241f96 100644 --- a/capifcore/internal/securityapi/typevalidation.go +++ b/capifcore/internal/securityapi/typevalidation.go @@ -35,7 +35,7 @@ func (tokenReq AccessTokenReq) Validate() (bool, AccessTokenErr) { } //3gpp#aefId1:apiName1,apiName2,…apiNameX;aefId2:apiName1,apiName2,…apiNameY;…aefIdN:apiName1,apiName2,…apiNameZ - if tokenReq.Scope != nil { + if tokenReq.Scope != nil && *tokenReq.Scope != "" { scope := strings.Split(*tokenReq.Scope, "#") if len(scope) < 2 { return false, createAccessTokenError(AccessTokenErrErrorInvalidScope, "Malformed scope")