本文整理汇总了Golang中github.com/cloudwan/gohan/server/middleware.IdentityService.GetServiceAuthorization方法的典型用法代码示例。如果您正苦于以下问题:Golang IdentityService.GetServiceAuthorization方法的具体用法?Golang IdentityService.GetServiceAuthorization怎么用?Golang IdentityService.GetServiceAuthorization使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudwan/gohan/server/middleware.IdentityService
的用法示例。
在下文中一共展示了IdentityService.GetServiceAuthorization方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: fillInContext
func fillInContext(context middleware.Context, r *http.Request, w http.ResponseWriter, s *schema.Schema, sync sync.Sync, identityService middleware.IdentityService) {
context["path"] = r.URL.Path
context["http_request"] = r
context["http_response"] = w
context["schema"] = s
context["sync"] = sync
context["identity_service"] = identityService
context["service_auth"], _ = identityService.GetServiceAuthorization()
}
示例2: fillInContext
func fillInContext(context middleware.Context, db db.DB,
r *http.Request, w http.ResponseWriter,
s *schema.Schema, p martini.Params, sync sync.Sync,
identityService middleware.IdentityService,
queue *job.Queue) {
context["path"] = r.URL.Path
context["http_request"] = r
context["http_response"] = w
context["schema"] = s
context["params"] = p
context["sync"] = sync
context["db"] = db
context["queue"] = queue
context["identity_service"] = identityService
context["service_auth"], _ = identityService.GetServiceAuthorization()
context["openstack_client"] = identityService.GetClient()
}