mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-19 19:48:45 +00:00
fix: generate proto files
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
// Code generated by protoc-gen-authmethod. DO NOT EDIT.
|
||||
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc"
|
||||
|
||||
utils_auth "github.com/caos/zitadel/internal/api/auth"
|
||||
utils_grpc "github.com/caos/zitadel/internal/api/grpc"
|
||||
)
|
||||
|
||||
/**
|
||||
* AdminService
|
||||
*/
|
||||
|
||||
var AdminService_AuthMethods = utils_auth.MethodMapping{
|
||||
|
||||
"/zitadel.admin.api.v1.AdminService/IsOrgUnique": utils_auth.Option{
|
||||
Permission: "iam.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.admin.api.v1.AdminService/GetOrgByID": utils_auth.Option{
|
||||
Permission: "iam.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.admin.api.v1.AdminService/SearchOrgs": utils_auth.Option{
|
||||
Permission: "iam.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.admin.api.v1.AdminService/SetUpOrg": utils_auth.Option{
|
||||
Permission: "iam.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
}
|
||||
|
||||
func AdminService_Authorization_Interceptor(verifier utils_auth.TokenVerifier, authConf *utils_auth.Config) grpc.UnaryServerInterceptor {
|
||||
return utils_grpc.AuthorizationInterceptor(verifier, authConf, AdminService_AuthMethods)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,348 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: admin.proto
|
||||
|
||||
/*
|
||||
Package grpc is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
|
||||
func request_AdminService_Healthz_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.Healthz(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_AdminService_Ready_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.Ready(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_AdminService_Validate_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.Validate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_AdminService_IsOrgUnique_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_AdminService_IsOrgUnique_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq UniqueOrgRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AdminService_IsOrgUnique_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.IsOrgUnique(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_AdminService_GetOrgByID_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq OrgID
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetOrgByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_AdminService_SearchOrgs_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq OrgSearchRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.SearchOrgs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_AdminService_SetUpOrg_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq OrgSetUpRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.SetUpOrg(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterAdminServiceHandlerFromEndpoint is same as RegisterAdminServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterAdminServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
return RegisterAdminServiceHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterAdminServiceHandler registers the http handlers for service AdminService to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterAdminServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterAdminServiceHandlerClient(ctx, mux, NewAdminServiceClient(conn))
|
||||
}
|
||||
|
||||
// RegisterAdminServiceHandlerClient registers the http handlers for service AdminService
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AdminServiceClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AdminServiceClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "AdminServiceClient" to call the correct interceptors.
|
||||
func RegisterAdminServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdminServiceClient) error {
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_Healthz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_Healthz_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_Healthz_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_Ready_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_Ready_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_Ready_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_Validate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_Validate_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_Validate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_IsOrgUnique_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_IsOrgUnique_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_IsOrgUnique_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_GetOrgByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_GetOrgByID_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_GetOrgByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_AdminService_SearchOrgs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_SearchOrgs_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_SearchOrgs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_AdminService_SetUpOrg_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_SetUpOrg_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_SetUpOrg_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_AdminService_Healthz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"healthz"}, ""))
|
||||
|
||||
pattern_AdminService_Ready_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"ready"}, ""))
|
||||
|
||||
pattern_AdminService_Validate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"validate"}, ""))
|
||||
|
||||
pattern_AdminService_IsOrgUnique_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"orgs", "_isunique"}, ""))
|
||||
|
||||
pattern_AdminService_GetOrgByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"orgs", "id"}, ""))
|
||||
|
||||
pattern_AdminService_SearchOrgs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"orgs", "_search"}, ""))
|
||||
|
||||
pattern_AdminService_SetUpOrg_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"orgs", "_setup"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_AdminService_Healthz_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_Ready_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_Validate_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_IsOrgUnique_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_GetOrgByID_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_SearchOrgs_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_SetUpOrg_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
@@ -0,0 +1,530 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "admin service",
|
||||
"version": "0.1",
|
||||
"contact": {
|
||||
"url": "https://github.com/caos/zitadel/pkg/admin"
|
||||
}
|
||||
},
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json",
|
||||
"application/grpc"
|
||||
],
|
||||
"produces": [
|
||||
"application/json",
|
||||
"application/grpc"
|
||||
],
|
||||
"paths": {
|
||||
"/healthz": {
|
||||
"get": {
|
||||
"summary": "Healthz returns status OK as soon as the service started",
|
||||
"operationId": "Healthz",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/orgs/_isunique": {
|
||||
"get": {
|
||||
"summary": "ORG",
|
||||
"operationId": "IsOrgUnique",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1UniqueOrgResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "domain",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/orgs/_search": {
|
||||
"post": {
|
||||
"operationId": "SearchOrgs",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1OrgSearchResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1OrgSearchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/orgs/_setup": {
|
||||
"post": {
|
||||
"operationId": "SetUpOrg",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1OrgSetUpResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1OrgSetUpRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/orgs/{id}": {
|
||||
"get": {
|
||||
"operationId": "GetOrgByID",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1Org"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/ready": {
|
||||
"get": {
|
||||
"summary": "Ready returns status OK as soon as all dependent services are available",
|
||||
"operationId": "Ready",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/validate": {
|
||||
"get": {
|
||||
"operationId": "Validate",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/protobufStruct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"NULL_VALUE"
|
||||
],
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"v1CreateOrgRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1Gender": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"GENDER_UNSPECIFIED",
|
||||
"GENDER_FEMALE",
|
||||
"GENDER_MALE",
|
||||
"GENDER_DIVERSE"
|
||||
],
|
||||
"default": "GENDER_UNSPECIFIED"
|
||||
},
|
||||
"v1Org": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"$ref": "#/definitions/v1OrgState"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1OrgSearchKey": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ORGSEARCHKEY_UNSPECIFIED",
|
||||
"ORGSEARCHKEY_ORG_NAME",
|
||||
"ORGSEARCHKEY_DOMAIN",
|
||||
"ORGSEARCHKEY_STATE"
|
||||
],
|
||||
"default": "ORGSEARCHKEY_UNSPECIFIED"
|
||||
},
|
||||
"v1OrgSearchMethod": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ORGSEARCHMETHOD_EQUALS",
|
||||
"ORGSEARCHMETHOD_STARTS_WITH",
|
||||
"ORGSEARCHMETHOD_CONTAINS"
|
||||
],
|
||||
"default": "ORGSEARCHMETHOD_EQUALS"
|
||||
},
|
||||
"v1OrgSearchQuery": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"$ref": "#/definitions/v1OrgSearchKey"
|
||||
},
|
||||
"method": {
|
||||
"$ref": "#/definitions/v1OrgSearchMethod"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1OrgSearchRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"sorting_column": {
|
||||
"$ref": "#/definitions/v1OrgSearchKey"
|
||||
},
|
||||
"asc": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1OrgSearchQuery"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1OrgSearchResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"limit": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"total_result": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
"result": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1Org"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1OrgSetUpRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"org": {
|
||||
"$ref": "#/definitions/v1CreateOrgRequest"
|
||||
},
|
||||
"user": {
|
||||
"$ref": "#/definitions/v1RegisterUserRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1OrgSetUpResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"org": {
|
||||
"$ref": "#/definitions/v1Org"
|
||||
},
|
||||
"user": {
|
||||
"$ref": "#/definitions/v1User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1OrgState": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ORGSTATE_UNSPECIFIED",
|
||||
"ORGSTATE_ACTIVE",
|
||||
"ORGSTATE_INACTIVE"
|
||||
],
|
||||
"default": "ORGSTATE_UNSPECIFIED"
|
||||
},
|
||||
"v1RegisterUserRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"nick_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"preferred_language": {
|
||||
"type": "string"
|
||||
},
|
||||
"gender": {
|
||||
"$ref": "#/definitions/v1Gender"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"org_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1UniqueOrgResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"is_unique": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1User": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"$ref": "#/definitions/v1UserState"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"user_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"nick_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"preferred_language": {
|
||||
"type": "string"
|
||||
},
|
||||
"gender": {
|
||||
"$ref": "#/definitions/v1Gender"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"isEmailVerified": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"isPhoneVerified": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"country": {
|
||||
"type": "string"
|
||||
},
|
||||
"locality": {
|
||||
"type": "string"
|
||||
},
|
||||
"postal_code": {
|
||||
"type": "string"
|
||||
},
|
||||
"region": {
|
||||
"type": "string"
|
||||
},
|
||||
"street_address": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1UserState": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"USERSTATE_UNSPECIFIED",
|
||||
"USERSTATE_ACTIVE",
|
||||
"USERSTATE_INACTIVE",
|
||||
"USERSTATE_DELETED",
|
||||
"USERSTATE_LOCKED",
|
||||
"USERSTATE_SUSPEND",
|
||||
"USERSTATE_INITIAL"
|
||||
],
|
||||
"default": "USERSTATE_UNSPECIFIED"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: github.com/caos/zitadel/pkg/admin/api/grpc (interfaces: AdminServiceClient)
|
||||
|
||||
// Package api is a generated GoMock package.
|
||||
package api
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "github.com/caos/zitadel/pkg/admin/api/grpc"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
struct0 "github.com/golang/protobuf/ptypes/struct"
|
||||
grpc0 "google.golang.org/grpc"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockAdminServiceClient is a mock of AdminServiceClient interface
|
||||
type MockAdminServiceClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockAdminServiceClientMockRecorder
|
||||
}
|
||||
|
||||
// MockAdminServiceClientMockRecorder is the mock recorder for MockAdminServiceClient
|
||||
type MockAdminServiceClientMockRecorder struct {
|
||||
mock *MockAdminServiceClient
|
||||
}
|
||||
|
||||
// NewMockAdminServiceClient creates a new mock instance
|
||||
func NewMockAdminServiceClient(ctrl *gomock.Controller) *MockAdminServiceClient {
|
||||
mock := &MockAdminServiceClient{ctrl: ctrl}
|
||||
mock.recorder = &MockAdminServiceClientMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use
|
||||
func (m *MockAdminServiceClient) EXPECT() *MockAdminServiceClientMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// GetOrgByID mocks base method
|
||||
func (m *MockAdminServiceClient) GetOrgByID(arg0 context.Context, arg1 *grpc.OrgID, arg2 ...grpc0.CallOption) (*grpc.Org, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetOrgByID", varargs...)
|
||||
ret0, _ := ret[0].(*grpc.Org)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetOrgByID indicates an expected call of GetOrgByID
|
||||
func (mr *MockAdminServiceClientMockRecorder) GetOrgByID(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrgByID", reflect.TypeOf((*MockAdminServiceClient)(nil).GetOrgByID), varargs...)
|
||||
}
|
||||
|
||||
// Healthz mocks base method
|
||||
func (m *MockAdminServiceClient) Healthz(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc0.CallOption) (*empty.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "Healthz", varargs...)
|
||||
ret0, _ := ret[0].(*empty.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Healthz indicates an expected call of Healthz
|
||||
func (mr *MockAdminServiceClientMockRecorder) Healthz(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Healthz", reflect.TypeOf((*MockAdminServiceClient)(nil).Healthz), varargs...)
|
||||
}
|
||||
|
||||
// IsOrgUnique mocks base method
|
||||
func (m *MockAdminServiceClient) IsOrgUnique(arg0 context.Context, arg1 *grpc.UniqueOrgRequest, arg2 ...grpc0.CallOption) (*grpc.UniqueOrgResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "IsOrgUnique", varargs...)
|
||||
ret0, _ := ret[0].(*grpc.UniqueOrgResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// IsOrgUnique indicates an expected call of IsOrgUnique
|
||||
func (mr *MockAdminServiceClientMockRecorder) IsOrgUnique(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOrgUnique", reflect.TypeOf((*MockAdminServiceClient)(nil).IsOrgUnique), varargs...)
|
||||
}
|
||||
|
||||
// Ready mocks base method
|
||||
func (m *MockAdminServiceClient) Ready(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc0.CallOption) (*empty.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "Ready", varargs...)
|
||||
ret0, _ := ret[0].(*empty.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Ready indicates an expected call of Ready
|
||||
func (mr *MockAdminServiceClientMockRecorder) Ready(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ready", reflect.TypeOf((*MockAdminServiceClient)(nil).Ready), varargs...)
|
||||
}
|
||||
|
||||
// SearchOrgs mocks base method
|
||||
func (m *MockAdminServiceClient) SearchOrgs(arg0 context.Context, arg1 *grpc.OrgSearchRequest, arg2 ...grpc0.CallOption) (*grpc.OrgSearchResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SearchOrgs", varargs...)
|
||||
ret0, _ := ret[0].(*grpc.OrgSearchResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// SearchOrgs indicates an expected call of SearchOrgs
|
||||
func (mr *MockAdminServiceClientMockRecorder) SearchOrgs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchOrgs", reflect.TypeOf((*MockAdminServiceClient)(nil).SearchOrgs), varargs...)
|
||||
}
|
||||
|
||||
// SetUpOrg mocks base method
|
||||
func (m *MockAdminServiceClient) SetUpOrg(arg0 context.Context, arg1 *grpc.OrgSetUpRequest, arg2 ...grpc0.CallOption) (*grpc.OrgSetUpResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SetUpOrg", varargs...)
|
||||
ret0, _ := ret[0].(*grpc.OrgSetUpResponse)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// SetUpOrg indicates an expected call of SetUpOrg
|
||||
func (mr *MockAdminServiceClientMockRecorder) SetUpOrg(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpOrg", reflect.TypeOf((*MockAdminServiceClient)(nil).SetUpOrg), varargs...)
|
||||
}
|
||||
|
||||
// Validate mocks base method
|
||||
func (m *MockAdminServiceClient) Validate(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc0.CallOption) (*struct0.Struct, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "Validate", varargs...)
|
||||
ret0, _ := ret[0].(*struct0.Struct)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Validate indicates an expected call of Validate
|
||||
func (mr *MockAdminServiceClientMockRecorder) Validate(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockAdminServiceClient)(nil).Validate), varargs...)
|
||||
}
|
||||
@@ -11,14 +11,14 @@ import "authoption/options.proto";
|
||||
|
||||
package zitadel.admin.api.v1;
|
||||
|
||||
option go_package ="github.com/caos/zitadel/admin/api/grpc";
|
||||
option go_package ="github.com/caos/zitadel/pkg/admin/api/grpc";
|
||||
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "admin service";
|
||||
version: "0.1";
|
||||
contact:{
|
||||
url: "https://github.com/caos/zitadel/admin"
|
||||
url: "https://github.com/caos/zitadel/pkg/admin"
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
// Code generated by protoc-gen-authmethod. DO NOT EDIT.
|
||||
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc"
|
||||
|
||||
utils_auth "github.com/caos/zitadel/internal/api/auth"
|
||||
utils_grpc "github.com/caos/zitadel/internal/api/grpc"
|
||||
)
|
||||
|
||||
/**
|
||||
* AuthService
|
||||
*/
|
||||
|
||||
var AuthService_AuthMethods = utils_auth.MethodMapping{
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/GetMyUserSessions": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/GetMyUserProfile": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/UpdateMyUserProfile": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/GetMyUserEmail": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/ChangeMyUserEmail": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/VerifyMyUserEmail": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/ResendMyEmailVerificationMail": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/GetMyUserPhone": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/ChangeMyUserPhone": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/VerifyMyUserPhone": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/ResendMyPhoneVerificationCode": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/GetMyUserAddress": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/UpdateMyUserAddress": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/GetMyMfas": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/SetMyPassword": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/ChangeMyPassword": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/AddMfaOTP": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/VerifyMfaOTP": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/RemoveMfaOTP": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/SearchMyProjectOrgs": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/IsIamAdmin": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/zitadel.auth.api.v1.AuthService/GetMyZitadelPermissions": utils_auth.Option{
|
||||
Permission: "authenticated",
|
||||
CheckParam: "",
|
||||
},
|
||||
}
|
||||
|
||||
func AuthService_Authorization_Interceptor(verifier utils_auth.TokenVerifier, authConf *utils_auth.Config) grpc.UnaryServerInterceptor {
|
||||
return utils_grpc.AuthorizationInterceptor(verifier, authConf, AuthService_AuthMethods)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -10,14 +10,14 @@ import "authoption/options.proto";
|
||||
|
||||
package zitadel.auth.api.v1;
|
||||
|
||||
option go_package = "github.com/caos/zitadel/auth/api/grpc";
|
||||
option go_package = "github.com/caos/zitadel/pkg/auth/api/grpc";
|
||||
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "Auth API";
|
||||
version: "0.1";
|
||||
contact:{
|
||||
url: "https://github.com/caos/zitadel/auth"
|
||||
url: "https://github.com/caos/zitadel/pkg/auth"
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package grpc
|
||||
|
||||
//go:generate protoc -I$GOPATH/src -I../proto -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate -I${GOPATH}/src/github.com/caos/zitadel/internal/protoc/protoc-gen-authoption --go_out=plugins=grpc:$GOPATH/src --grpc-gateway_out=logtostderr=true:$GOPATH/src --swagger_out=logtostderr=true:. --authoption_out=. ../proto/management.proto
|
||||
//go:generate mockgen -package api -destination ./mock/management.proto.mock.go github.com/caos/zitadel/management/api/grpc ManagementServiceClient
|
||||
//go:generate mockgen -package api -destination ./mock/management.proto.mock.go github.com/caos/zitadel/pkg/management/api/grpc ManagementServiceClient
|
||||
|
||||
//go:generate ../../../console/etc/generate-grpc.sh
|
||||
|
||||
@@ -0,0 +1,521 @@
|
||||
// Code generated by protoc-gen-authmethod. DO NOT EDIT.
|
||||
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc"
|
||||
|
||||
utils_auth "github.com/caos/zitadel/internal/api/auth"
|
||||
utils_grpc "github.com/caos/zitadel/internal/api/grpc"
|
||||
)
|
||||
|
||||
/**
|
||||
* ManagementService
|
||||
*/
|
||||
|
||||
var ManagementService_AuthMethods = utils_auth.MethodMapping{
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetUserByID": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetUserByEmailGlobal": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchUsers": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/IsUserUnique": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreateUser": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeactivateUser": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ReactivateUser": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/LockUser": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UnlockUser": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeleteUser": utils_auth.Option{
|
||||
Permission: "user.delete",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UserChanges": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ApplicationChanges": utils_auth.Option{
|
||||
Permission: "project.app.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/OrgChanges": utils_auth.Option{
|
||||
Permission: "org.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ProjectChanges": utils_auth.Option{
|
||||
Permission: "project.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetUserProfile": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateUserProfile": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetUserEmail": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ChangeUserEmail": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ResendEmailVerificationMail": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetUserPhone": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ChangeUserPhone": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ResendPhoneVerificationCode": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetUserAddress": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateUserAddress": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetUserMfas": utils_auth.Option{
|
||||
Permission: "user.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SendSetPasswordNotification": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SetInitialPassword": utils_auth.Option{
|
||||
Permission: "user.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetPasswordComplexityPolicy": utils_auth.Option{
|
||||
Permission: "policy.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreatePasswordComplexityPolicy": utils_auth.Option{
|
||||
Permission: "policy.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdatePasswordComplexityPolicy": utils_auth.Option{
|
||||
Permission: "policy.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeletePasswordComplexityPolicy": utils_auth.Option{
|
||||
Permission: "policy.delete",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetPasswordAgePolicy": utils_auth.Option{
|
||||
Permission: "policy.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreatePasswordAgePolicy": utils_auth.Option{
|
||||
Permission: "policy.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdatePasswordAgePolicy": utils_auth.Option{
|
||||
Permission: "policy.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeletePasswordAgePolicy": utils_auth.Option{
|
||||
Permission: "policy.delete",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetPasswordLockoutPolicy": utils_auth.Option{
|
||||
Permission: "policy.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreatePasswordLockoutPolicy": utils_auth.Option{
|
||||
Permission: "policy.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdatePasswordLockoutPolicy": utils_auth.Option{
|
||||
Permission: "policy.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeletePasswordLockoutPolicy": utils_auth.Option{
|
||||
Permission: "policy.delete",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetOrgByID": utils_auth.Option{
|
||||
Permission: "org.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetOrgByDomainGlobal": utils_auth.Option{
|
||||
Permission: "org.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeactivateOrg": utils_auth.Option{
|
||||
Permission: "org.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ReactivateOrg": utils_auth.Option{
|
||||
Permission: "org.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetOrgMemberRoles": utils_auth.Option{
|
||||
Permission: "org.member.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/AddOrgMember": utils_auth.Option{
|
||||
Permission: "org.member.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ChangeOrgMember": utils_auth.Option{
|
||||
Permission: "org.member.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/RemoveOrgMember": utils_auth.Option{
|
||||
Permission: "org.member.delete",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchOrgMembers": utils_auth.Option{
|
||||
Permission: "org.member.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchProjects": utils_auth.Option{
|
||||
Permission: "project.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ProjectByID": utils_auth.Option{
|
||||
Permission: "project.read",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreateProject": utils_auth.Option{
|
||||
Permission: "project.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateProject": utils_auth.Option{
|
||||
Permission: "project.write",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeactivateProject": utils_auth.Option{
|
||||
Permission: "project.write",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ReactivateProject": utils_auth.Option{
|
||||
Permission: "project.write",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetGrantedProjectGrantByID": utils_auth.Option{
|
||||
Permission: "project.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetProjectMemberRoles": utils_auth.Option{
|
||||
Permission: "project.member.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchProjectMembers": utils_auth.Option{
|
||||
Permission: "project.member.read",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/AddProjectMember": utils_auth.Option{
|
||||
Permission: "project.member.write",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ChangeProjectMember": utils_auth.Option{
|
||||
Permission: "project.member.write",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/RemoveProjectMember": utils_auth.Option{
|
||||
Permission: "project.member.delete",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchProjectRoles": utils_auth.Option{
|
||||
Permission: "project.role.read",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/AddProjectRole": utils_auth.Option{
|
||||
Permission: "project.role.write",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/RemoveProjectRole": utils_auth.Option{
|
||||
Permission: "project.role.delete",
|
||||
CheckParam: "Id",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchApplications": utils_auth.Option{
|
||||
Permission: "project.app.read",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ApplicationByID": utils_auth.Option{
|
||||
Permission: "project.app.read",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreateOIDCApplication": utils_auth.Option{
|
||||
Permission: "project.app.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateApplication": utils_auth.Option{
|
||||
Permission: "project.app.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeactivateApplication": utils_auth.Option{
|
||||
Permission: "project.app.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ReactivateApplication": utils_auth.Option{
|
||||
Permission: "project.app.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateApplicationOIDCConfig": utils_auth.Option{
|
||||
Permission: "project.app.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/RegenerateOIDCClientSecret": utils_auth.Option{
|
||||
Permission: "project.app.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchProjectGrants": utils_auth.Option{
|
||||
Permission: "project.grant.read",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ProjectGrantByID": utils_auth.Option{
|
||||
Permission: "project.grant.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreateProjectGrant": utils_auth.Option{
|
||||
Permission: "project.grant.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateProjectGrant": utils_auth.Option{
|
||||
Permission: "project.grant.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeactivateProjectGrant": utils_auth.Option{
|
||||
Permission: "project.grant.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ReactivateProjectGrant": utils_auth.Option{
|
||||
Permission: "project.grant.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/GetProjectGrantMemberRoles": utils_auth.Option{
|
||||
Permission: "project.grant.member.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchProjectGrantMembers": utils_auth.Option{
|
||||
Permission: "project.grant.member.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/AddProjectGrantMember": utils_auth.Option{
|
||||
Permission: "project.grant.member.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ChangeProjectGrantMember": utils_auth.Option{
|
||||
Permission: "project.grant.member.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/RemoveProjectGrantMember": utils_auth.Option{
|
||||
Permission: "project.grant.member.delete",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchUserGrants": utils_auth.Option{
|
||||
Permission: "user.grant.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UserGrantByID": utils_auth.Option{
|
||||
Permission: "user.grant.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreateUserGrant": utils_auth.Option{
|
||||
Permission: "user.grant.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateUserGrant": utils_auth.Option{
|
||||
Permission: "user.grant.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeactivateUserGrant": utils_auth.Option{
|
||||
Permission: "user.grant.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ReactivateUserGrant": utils_auth.Option{
|
||||
Permission: "user.grant.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchProjectUserGrants": utils_auth.Option{
|
||||
Permission: "project.user.grant.read",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ProjectUserGrantByID": utils_auth.Option{
|
||||
Permission: "project.user.grant.read",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreateProjectUserGrant": utils_auth.Option{
|
||||
Permission: "project.user.grant.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateProjectUserGrant": utils_auth.Option{
|
||||
Permission: "project.user.grant.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeactivateProjectUserGrant": utils_auth.Option{
|
||||
Permission: "project.user.grant.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ReactivateProjectUserGrant": utils_auth.Option{
|
||||
Permission: "project.user.grant.write",
|
||||
CheckParam: "ProjectId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/SearchProjectGrantUserGrants": utils_auth.Option{
|
||||
Permission: "project.grant.user.grant.read",
|
||||
CheckParam: "ProjectGrantId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ProjectGrantUserGrantByID": utils_auth.Option{
|
||||
Permission: "project.grant.user.grant.read",
|
||||
CheckParam: "ProjectGrantId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/CreateProjectGrantUserGrant": utils_auth.Option{
|
||||
Permission: "project.grant.user.grant.write",
|
||||
CheckParam: "ProjectGrantId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/UpdateProjectGrantUserGrant": utils_auth.Option{
|
||||
Permission: "project.grant.user.grant.write",
|
||||
CheckParam: "ProjectGrantId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/DeactivateProjectGrantUserGrant": utils_auth.Option{
|
||||
Permission: "project.grant.user.grant.write",
|
||||
CheckParam: "ProjectGrantId",
|
||||
},
|
||||
|
||||
"/caos.zitadel.management.api.v1.ManagementService/ReactivateProjectGrantUserGrant": utils_auth.Option{
|
||||
Permission: "project.grant.user.grant.write",
|
||||
CheckParam: "ProjectGrantId",
|
||||
},
|
||||
}
|
||||
|
||||
func ManagementService_Authorization_Interceptor(verifier utils_auth.TokenVerifier, authConf *utils_auth.Config) grpc.UnaryServerInterceptor {
|
||||
return utils_grpc.AuthorizationInterceptor(verifier, authConf, ManagementService_AuthMethods)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -11,14 +11,14 @@ import "authoption/options.proto";
|
||||
|
||||
package caos.zitadel.management.api.v1;
|
||||
|
||||
option go_package = "github.com/caos/zitadel/management/api/grpc";
|
||||
option go_package = "github.com/caos/zitadel/pkg/management/api/grpc";
|
||||
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "Management API";
|
||||
version: "0.1";
|
||||
contact:{
|
||||
url: "https://github.com/caos/zitadel/management"
|
||||
url: "https://github.com/caos/zitadel/pkg/management"
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user