Skip to content

Commit

Permalink
Add meta-scope for Adobe IO
Browse files Browse the repository at this point in the history
  • Loading branch information
francescomari committed Oct 16, 2019
1 parent 4564bf9 commit 1f39dcd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ims/exchange_jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ type MetaScope int
const (
// MetaScopeCloudManager is the meta-scope for Cloud Manager
MetaScopeCloudManager MetaScope = iota
// MetaScopeAdobeIO is the meta-scope for Adobe IO
MetaScopeAdobeIO
)

// ExchangeJWTRequest contains the data for exchanging a JWT token with an
Expand Down Expand Up @@ -73,6 +75,8 @@ func (c *Client) ExchangeJWT(r *ExchangeJWTRequest) (*ExchangeJWTResponse, error
switch ms {
case MetaScopeCloudManager:
claims[fmt.Sprintf("%v/s/ent_cloudmgr_sdk", c.url)] = true
case MetaScopeAdobeIO:
claims[fmt.Sprintf("%v/s/ent_adobeio_sdk", c.url)] = true
default:
return nil, fmt.Errorf("invalid meta-scope: %v", ms)
}
Expand Down

0 comments on commit 1f39dcd

Please sign in to comment.