mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 11:58:02 +00:00
34 lines
824 B
Cheetah
34 lines
824 B
Cheetah
// Code generated by protoc-gen-authmethod. DO NOT EDIT.
|
|
|
|
package {{.File.GoPkg.Name}}
|
|
|
|
|
|
import (
|
|
"google.golang.org/grpc"
|
|
|
|
"github.com/zitadel/zitadel/internal/api/authz"
|
|
"github.com/zitadel/zitadel/internal/api/grpc/server/middleware"
|
|
)
|
|
|
|
{{ range $s := .File.Services }}
|
|
|
|
/**
|
|
* {{$s.Name}}
|
|
*/
|
|
|
|
const {{$s.Name}}_MethodPrefix = "{{$.File.Package}}.{{$s.Name}}"
|
|
|
|
var {{$s.Name}}_AuthMethods = authz.MethodMapping {
|
|
{{ range $m := $s.Method}}
|
|
{{ $mAuthOpt := option $m.Options "zitadel.v1.auth_option" }}
|
|
{{ if and $mAuthOpt $mAuthOpt.Permission }}
|
|
"/{{$.File.Package}}.{{$s.Name}}/{{.Name}}": authz.Option{
|
|
Permission: "{{$mAuthOpt.Permission}}",
|
|
CheckParam: "{{$mAuthOpt.CheckFieldName}}",
|
|
},
|
|
{{end}}
|
|
{{ end}}
|
|
}
|
|
|
|
{{ end }}
|