You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ti...@apache.org on 2021/08/05 01:22:06 UTC

[servicecomb-service-center] branch master updated: set a complete token (#1126)

This is an automated email from the ASF dual-hosted git repository.

tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new a0e6124  set a complete token (#1126)
a0e6124 is described below

commit a0e61240032377987278e7dfe5fadef9e75c2064
Author: Sphairis <56...@users.noreply.github.com>
AuthorDate: Thu Aug 5 09:22:01 2021 +0800

    set a complete token (#1126)
    
    * set token
    
    * set Bearer + token
    
    Co-authored-by: SphaIris <aaalixiaopei123>
---
 server/service/rbac/context.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/service/rbac/context.go b/server/service/rbac/context.go
index 1d2e8bf..3854033 100644
--- a/server/service/rbac/context.go
+++ b/server/service/rbac/context.go
@@ -56,6 +56,6 @@ func SignRequest(req *http.Request) error {
 	if auth == "" {
 		return errors.New("request unauthorized")
 	}
-	req.Header.Set("Authorization", auth)
+	req.Header.Set("Authorization", "Bearer "+auth)
 	return nil
 }