Code Review
/
nonrtric
/
plt
/
sme.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Generating token using keycloak
[nonrtric/plt/sme.git]
/
capifcore
/
internal
/
securityapi
/
typevalidation.go
diff --git
a/capifcore/internal/securityapi/typevalidation.go
b/capifcore/internal/securityapi/typevalidation.go
index
90dbda3
..
1241f96
100644
(file)
--- 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
}
//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")
scope := strings.Split(*tokenReq.Scope, "#")
if len(scope) < 2 {
return false, createAccessTokenError(AccessTokenErrErrorInvalidScope, "Malformed scope")