Skip to content

Commit

Permalink
Implement X-Broker-API-Originating-Identity (#148)
Browse files Browse the repository at this point in the history
* Add the request identity to the context.
* Return X-Broker-API-Originating-Identity header on response when it is sent on request
* Updated v7 folder

Co-authored-by: Quentin Barrand <[email protected]>
  • Loading branch information
FelisiaM and qbarrand authored Mar 31, 2021
1 parent c9c9e91 commit ab86339
Show file tree
Hide file tree
Showing 30 changed files with 541 additions and 334 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,18 @@ func (sb *ServiceBrokerImplementation) Provision(ctx context.Context,

The request context for every request contains the unparsed
`X-Broker-API-Originating-Identity` header under the key
`originatingIdentityKey`. More details on how the Open Service Broker API
`originatingIdentity`. More details on how the Open Service Broker API
manages request originating identity is available
[here](https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#originating-identity).

## Request Identity

The request context for every request contains the unparsed
`X-Broker-API-Request-Identity` header under the key
`requestIdentity`. More details on how the Open Service Broker API
manages request originating identity is available
[here](https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#request-identity).

## Example Service Broker

You can see the
Expand Down
1 change: 1 addition & 0 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func New(serviceBroker ServiceBroker, logger lager.Logger, brokerCredentials Bro
router.Use(middlewares.AddOriginatingIdentityToContext)
router.Use(apiVersionMiddleware.ValidateAPIVersionHdr)
router.Use(middlewares.AddInfoLocationToContext)
router.Use(middlewares.AddRequestIdentityToContext)

return router
}
Expand Down
Loading

0 comments on commit ab86339

Please sign in to comment.