providerv1beta1

package
v0.0.0-...-d2cb316 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 42

Documentation

Index

Constants

View Source
const (
	ProviderAPI_Authenticate_FullMethodName = "/cs3.auth.provider.v1beta1.ProviderAPI/Authenticate"
)

Variables

View Source
var (
	Role_name = map[int32]string{
		0: "ROLE_INVALID",
		1: "ROLE_OWNER",
		2: "ROLE_LEGACY",
		3: "ROLE_VIEWER",
		4: "ROLE_EDITOR",
		5: "ROLE_FILE_EDITOR",
		6: "ROLE_COOWNER",
		7: "ROLE_UPLOADER",
	}
	Role_value = map[string]int32{
		"ROLE_INVALID":     0,
		"ROLE_OWNER":       1,
		"ROLE_LEGACY":      2,
		"ROLE_VIEWER":      3,
		"ROLE_EDITOR":      4,
		"ROLE_FILE_EDITOR": 5,
		"ROLE_COOWNER":     6,
		"ROLE_UPLOADER":    7,
	}
)

Enum value maps for Role.

View Source
var File_cs3_auth_provider_v1beta1_provider_api_proto protoreflect.FileDescriptor
View Source
var File_cs3_auth_provider_v1beta1_resources_proto protoreflect.FileDescriptor
View Source
var ProviderAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cs3.auth.provider.v1beta1.ProviderAPI",
	HandlerType: (*ProviderAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authenticate",
			Handler:    _ProviderAPI_Authenticate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cs3/auth/provider/v1beta1/provider_api.proto",
}

ProviderAPI_ServiceDesc is the grpc.ServiceDesc for ProviderAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterProviderAPIServer

func RegisterProviderAPIServer(s grpc.ServiceRegistrar, srv ProviderAPIServer)

Types

type AuthenticateRequest

type AuthenticateRequest struct {

	// OPTIONAL.
	// Opaque information.
	Opaque *v1beta1.Opaque `protobuf:"bytes,1,opt,name=opaque,proto3" json:"opaque,omitempty"`
	// OPTIONAL.
	// The id of the client.
	// For basic authentication with username and password
	// both client_id and client_secret are expected to be filled.
	// However, for example, for OIDC only a token is necessary.
	ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// OPTIONAL.
	// The secret of the client.
	ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthenticateRequest) Descriptor deprecated

func (*AuthenticateRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateRequest) GetClientId

func (x *AuthenticateRequest) GetClientId() string

func (*AuthenticateRequest) GetClientSecret

func (x *AuthenticateRequest) GetClientSecret() string

func (*AuthenticateRequest) GetOpaque

func (x *AuthenticateRequest) GetOpaque() *v1beta1.Opaque

func (*AuthenticateRequest) ProtoMessage

func (*AuthenticateRequest) ProtoMessage()

func (*AuthenticateRequest) ProtoReflect

func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message

func (*AuthenticateRequest) Reset

func (x *AuthenticateRequest) Reset()

func (*AuthenticateRequest) String

func (x *AuthenticateRequest) String() string

type AuthenticateResponse

type AuthenticateResponse struct {

	// REQUIRED.
	// The response status.
	Status *v1beta11.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// REQUIRED.
	// The authenticated user.
	User *v1beta12.User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// REQUIRED.
	// The scope of the token to be issued.
	// This would be a list of resources with corresponding role-based access scope.
	TokenScope map[string]*Scope `` /* 179-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*AuthenticateResponse) Descriptor deprecated

func (*AuthenticateResponse) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateResponse.ProtoReflect.Descriptor instead.

func (*AuthenticateResponse) GetStatus

func (x *AuthenticateResponse) GetStatus() *v1beta11.Status

func (*AuthenticateResponse) GetTokenScope

func (x *AuthenticateResponse) GetTokenScope() map[string]*Scope

func (*AuthenticateResponse) GetUser

func (x *AuthenticateResponse) GetUser() *v1beta12.User

func (*AuthenticateResponse) ProtoMessage

func (*AuthenticateResponse) ProtoMessage()

func (*AuthenticateResponse) ProtoReflect

func (x *AuthenticateResponse) ProtoReflect() protoreflect.Message

func (*AuthenticateResponse) Reset

func (x *AuthenticateResponse) Reset()

func (*AuthenticateResponse) String

func (x *AuthenticateResponse) String() string

type ProviderAPIClient

type ProviderAPIClient interface {
	// Authenticate authenticates a client.
	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
}

ProviderAPIClient is the client API for ProviderAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ProviderAPIServer

type ProviderAPIServer interface {
	// Authenticate authenticates a client.
	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
}

ProviderAPIServer is the server API for ProviderAPI service. All implementations should embed UnimplementedProviderAPIServer for forward compatibility

type Role

type Role int32

The role associated with the scope.

const (
	// Used for invalid roles
	Role_ROLE_INVALID Role = 0
	// Grants owner permissions on a resource
	Role_ROLE_OWNER Role = 1
	// Provides backwards compatibility
	Role_ROLE_LEGACY Role = 2
	// Grants non-editor role on a resource
	Role_ROLE_VIEWER Role = 3
	// Grants editor permission on a resource, including folders
	Role_ROLE_EDITOR Role = 4
	// Grants editor permission on a single file
	Role_ROLE_FILE_EDITOR Role = 5
	// Grants co-owner permissions on a resource
	Role_ROLE_COOWNER Role = 6
	// Role with only write permission can use InitiateFileUpload, nothing else
	Role_ROLE_UPLOADER Role = 7
)

func (Role) Descriptor

func (Role) Descriptor() protoreflect.EnumDescriptor

func (Role) Enum

func (x Role) Enum() *Role

func (Role) EnumDescriptor deprecated

func (Role) EnumDescriptor() ([]byte, []int)

Deprecated: Use Role.Descriptor instead.

func (Role) Number

func (x Role) Number() protoreflect.EnumNumber

func (Role) String

func (x Role) String() string

func (Role) Type

func (Role) Type() protoreflect.EnumType

type Scope

type Scope struct {

	// REQUIRED.
	// The resource embedded in the request of a particular method. It depends on
	// the method, hence is left as opaque.
	Resource *v1beta1.OpaqueEntry `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// REQUIRED.
	// The role associated with the resource.
	Role Role `protobuf:"varint,2,opt,name=role,proto3,enum=cs3.auth.provider.v1beta1.Role" json:"role,omitempty"`
	// contains filtered or unexported fields
}

Scope defines role-based permissions for various resources.

func (*Scope) Descriptor deprecated

func (*Scope) Descriptor() ([]byte, []int)

Deprecated: Use Scope.ProtoReflect.Descriptor instead.

func (*Scope) GetResource

func (x *Scope) GetResource() *v1beta1.OpaqueEntry

func (*Scope) GetRole

func (x *Scope) GetRole() Role

func (*Scope) ProtoMessage

func (*Scope) ProtoMessage()

func (*Scope) ProtoReflect

func (x *Scope) ProtoReflect() protoreflect.Message

func (*Scope) Reset

func (x *Scope) Reset()

func (*Scope) String

func (x *Scope) String() string

type UnimplementedProviderAPIServer

type UnimplementedProviderAPIServer struct {
}

UnimplementedProviderAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedProviderAPIServer) Authenticate

type UnsafeProviderAPIServer

type UnsafeProviderAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeProviderAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProviderAPIServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL