mirror of
https://github.com/harness/drone.git
synced 2025-05-06 05:52:47 +08:00

This change adds the initial stepping stones for harness integration: - Authentication: JWT/PAT/SAT support - Authorization: ACL integration (acl currently denies requests as gitness hasn't been integrated yet) - Remote Clients for Token, User, ServiceAccount, ACL - User Integration: Syncs harness users during authentication if unknown - SA integration: syncs harness service accounts during authentication if unknown - Initial harness API: THIS WILL BE CHANGED IN THE FUTURE! - single harness subpackage (all marked with harness build flag) - harness & standalone wire + make build commands
19 lines
341 B
Go
19 lines
341 B
Go
package request
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
const (
|
|
UserUIDParamName = "userUID"
|
|
ServiceAccountUIDParamName = "saUID"
|
|
)
|
|
|
|
func GetUserUID(r *http.Request) (string, error) {
|
|
return ParamOrError(r, UserUIDParamName)
|
|
}
|
|
|
|
func GetServiceAccountUID(r *http.Request) (string, error) {
|
|
return ParamOrError(r, ServiceAccountUIDParamName)
|
|
}
|