v1

package
v0.89.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package v1 contains the API of SCIM services.

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (

	// SCIMSchemaUser is uniform resource name for user resource
	SCIMSchemaUser = "urn:ietf:params:scim:schemas:core:2.0:User"
	// SCIMSchemaListResponse is uniform resource name for list response
	SCIMSchemaListResponse = "urn:ietf:params:scim:api:messages:2.0:ListResponse"
)
View Source
const (
	// EventTypeOrganizationMemberAdded is the type of event fired after a member has been added to an organization.
	// SubjectID contains the ID of the added member.
	EventTypeOrganizationMemberAdded = "scim.organization-member.added"
	// EventTypeOrganizationMemberRemoved is the type of event fired after a member has been removed from an organization.
	// SubjectID contains the ID of the removed member.
	EventTypeOrganizationMemberRemoved = "scim.organization-member.removed"
	// EventTypeOrganizationMemberUpdated is the type of event fired after a member has been updated in an organization
	// SubjectID contains the ID of the updated member.
	EventTypeOrganizationMemberUpdated = "scim.organization-member.updated"
)
View Source
const (

	// PermissionUserList is needed for getting the list of users
	PermissionUserList = "scim.user.list"
	// PermissionUserGet is needed for getting the user infomration
	PermissionUserGet = "scim.user.get"
	// PermissionUserAdd is needed for adding a user
	PermissionUserAdd = "scim.user.add"
	// PermissionUserUpdate is needed for updating a user
	PermissionUserUpdate = "scim.user.update"
	// PermissionUserDelete is needed for removing a user
	PermissionUserDelete = "scim.user.delete"
)
View Source
const (
	// APIID contains identifier of this API
	APIID = "scim/v1"
	// APIMajorVersion contains major version of this API
	APIMajorVersion = 1
	// APIMinorVersion contains minor version of this API
	APIMinorVersion = 1
	// APIPatchVersion contains patch version of this API
	APIPatchVersion = 0
)

Variables

Functions

func RegisterSCIMServiceHandler

func RegisterSCIMServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSCIMServiceHandler registers the http handlers for service SCIMService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSCIMServiceHandlerClient

func RegisterSCIMServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SCIMServiceClient) error

RegisterSCIMServiceHandlerClient registers the http handlers for service SCIMService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SCIMServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SCIMServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SCIMServiceClient" to call the correct interceptors.

func RegisterSCIMServiceHandlerFromEndpoint

func RegisterSCIMServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSCIMServiceHandlerFromEndpoint is same as RegisterSCIMServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSCIMServiceHandlerServer

func RegisterSCIMServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SCIMServiceServer) error

RegisterSCIMServiceHandlerServer registers the http handlers for service SCIMService to "mux". UnaryRPC :call SCIMServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSCIMServiceHandlerFromEndpoint instead.

func RegisterSCIMServiceServer

func RegisterSCIMServiceServer(s *grpc.Server, srv SCIMServiceServer)

Types

type ListUserResponse

type ListUserResponse struct {

	// Name of schemas followed in response
	Schemas []string `protobuf:"bytes,1,rep,name=schemas,proto3" json:"schemas,omitempty"`
	// Total number of results available
	TotalResult int32 `protobuf:"varint,2,opt,name=totalResult,proto3" json:"totalResult,omitempty"`
	// Pagination offset value
	StartIndex int32 `protobuf:"varint,3,opt,name=startIndex,proto3" json:"startIndex,omitempty"`
	// Pagination limit value
	Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// List of users
	Resources []*User `protobuf:"bytes,5,rep,name=Resources,proto3" json:"Resources,omitempty"`
	// contains filtered or unexported fields
}

Response for ListUsers

func (*ListUserResponse) Descriptor deprecated

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

Deprecated: Use ListUserResponse.ProtoReflect.Descriptor instead.

func (*ListUserResponse) GetCount

func (x *ListUserResponse) GetCount() int32

func (*ListUserResponse) GetResources

func (x *ListUserResponse) GetResources() []*User

func (*ListUserResponse) GetSchemas

func (x *ListUserResponse) GetSchemas() []string

func (*ListUserResponse) GetStartIndex

func (x *ListUserResponse) GetStartIndex() int32

func (*ListUserResponse) GetTotalResult

func (x *ListUserResponse) GetTotalResult() int32

func (*ListUserResponse) ProtoMessage

func (*ListUserResponse) ProtoMessage()

func (*ListUserResponse) ProtoReflect added in v0.89.0

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

func (*ListUserResponse) Reset

func (x *ListUserResponse) Reset()

func (*ListUserResponse) String

func (x *ListUserResponse) String() string

type ListUsersRequest

type ListUsersRequest struct {

	// Pagination offset value
	StartIndex int32 `protobuf:"varint,1,opt,name=startIndex,proto3" json:"startIndex,omitempty"`
	// Pagination limit value
	Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// Filters to apply for querying data
	Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

Request params for ListUsers

func (*ListUsersRequest) Descriptor deprecated

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

Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.

func (*ListUsersRequest) GetCount

func (x *ListUsersRequest) GetCount() int32

func (*ListUsersRequest) GetFilter

func (x *ListUsersRequest) GetFilter() string

func (*ListUsersRequest) GetStartIndex

func (x *ListUsersRequest) GetStartIndex() int32

func (*ListUsersRequest) ProtoMessage

func (*ListUsersRequest) ProtoMessage()

func (*ListUsersRequest) ProtoReflect added in v0.89.0

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

func (*ListUsersRequest) Reset

func (x *ListUsersRequest) Reset()

func (*ListUsersRequest) String

func (x *ListUsersRequest) String() string

type Metadata

type Metadata struct {

	// Identifies type of resource example User / Group
	ResourceType string `protobuf:"bytes,1,opt,name=resourceType,proto3" json:"resourceType,omitempty"`
	// Defines the time at which the resource was created
	Created *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	// Defines the time at which the resource was updated
	LastModified *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lastModified,proto3" json:"lastModified,omitempty"`
	// contains filtered or unexported fields
}

Metadata is the schema used for meta data of a resource in SCIM API response

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetCreated

func (x *Metadata) GetCreated() *timestamppb.Timestamp

func (*Metadata) GetLastModified

func (x *Metadata) GetLastModified() *timestamppb.Timestamp

func (*Metadata) GetResourceType

func (x *Metadata) GetResourceType() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect added in v0.89.0

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type SCIMServiceClient

type SCIMServiceClient interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None (authenticated only)
	GetAPIVersion(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.Version, error)
	// List the users as per SCIM API requirements
	// For an organization identifier inferred via API Key
	// Required permissions:
	// - scim.user.list on the organization
	ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUserResponse, error)
	// Get the organization member information based on user identifier as per SCIM API requirements
	// Required permissions:
	// - scim.user.get on the organization
	GetUser(ctx context.Context, in *v1.IDOptions, opts ...grpc.CallOption) (*User, error)
	// Invite the user to an organization
	// that is inferred from API key
	// Required permissions:
	// - scim.user.add on the organization
	AddUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
	// Update the user information
	// Required permissions:
	// - scim.user.update on the organization
	UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
	// Delete the user from an organization
	// Required permissions:
	// - scim.user.delete on the organization
	DeleteUser(ctx context.Context, in *v1.IDOptions, opts ...grpc.CallOption) (*v1.Empty, error)
}

SCIMServiceClient is the client API for SCIMService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type SCIMServiceServer

type SCIMServiceServer interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None (authenticated only)
	GetAPIVersion(context.Context, *v1.Empty) (*v1.Version, error)
	// List the users as per SCIM API requirements
	// For an organization identifier inferred via API Key
	// Required permissions:
	// - scim.user.list on the organization
	ListUsers(context.Context, *ListUsersRequest) (*ListUserResponse, error)
	// Get the organization member information based on user identifier as per SCIM API requirements
	// Required permissions:
	// - scim.user.get on the organization
	GetUser(context.Context, *v1.IDOptions) (*User, error)
	// Invite the user to an organization
	// that is inferred from API key
	// Required permissions:
	// - scim.user.add on the organization
	AddUser(context.Context, *User) (*User, error)
	// Update the user information
	// Required permissions:
	// - scim.user.update on the organization
	UpdateUser(context.Context, *User) (*User, error)
	// Delete the user from an organization
	// Required permissions:
	// - scim.user.delete on the organization
	DeleteUser(context.Context, *v1.IDOptions) (*v1.Empty, error)
}

SCIMServiceServer is the server API for SCIMService service.

type UnimplementedSCIMServiceServer

type UnimplementedSCIMServiceServer struct {
}

UnimplementedSCIMServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedSCIMServiceServer) AddUser

func (*UnimplementedSCIMServiceServer) DeleteUser

func (*UnimplementedSCIMServiceServer) GetAPIVersion

func (*UnimplementedSCIMServiceServer) GetUser

func (*UnimplementedSCIMServiceServer) ListUsers

func (*UnimplementedSCIMServiceServer) UpdateUser

type User

type User struct {

	// Name of schemas followed in request / response
	Schemas []string `protobuf:"bytes,1,rep,name=schemas,proto3" json:"schemas,omitempty"`
	// User identifier
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Display name of user
	DisplayName string `protobuf:"bytes,3,opt,name=displayName,proto3" json:"displayName,omitempty"`
	// Nick name of user
	NickName string `protobuf:"bytes,4,opt,name=nickName,proto3" json:"nickName,omitempty"`
	// Language preferred by user
	Locale string `protobuf:"bytes,5,opt,name=locale,proto3" json:"locale,omitempty"`
	// Name of user
	Name *UserName `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
	// Emails of user
	Emails []*UserResource `protobuf:"bytes,7,rep,name=emails,proto3" json:"emails,omitempty"`
	// Photos of user
	Photos []*UserResource `protobuf:"bytes,8,rep,name=photos,proto3" json:"photos,omitempty"`
	// Meta information of user creation and updation
	Meta *Metadata `protobuf:"bytes,9,opt,name=meta,proto3" json:"meta,omitempty"`
	// External identifier is used to know the ArangoGraph Insights Platform id
	ExternalId string `protobuf:"bytes,10,opt,name=externalId,proto3" json:"externalId,omitempty"`
	// Check if user is active
	Active bool `protobuf:"varint,11,opt,name=active,proto3" json:"active,omitempty"`
	// userName attribute of the external system like okta
	UserName string `protobuf:"bytes,12,opt,name=userName,proto3" json:"userName,omitempty"`
	// contains filtered or unexported fields
}

User is the schema used for user information in SCIM API response

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetActive

func (x *User) GetActive() bool

func (*User) GetDisplayName

func (x *User) GetDisplayName() string

func (*User) GetEmails

func (x *User) GetEmails() []*UserResource

func (*User) GetExternalId

func (x *User) GetExternalId() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetLocale

func (x *User) GetLocale() string

func (*User) GetMeta

func (x *User) GetMeta() *Metadata

func (*User) GetName

func (x *User) GetName() *UserName

func (*User) GetNickName

func (x *User) GetNickName() string

func (*User) GetPhotos

func (x *User) GetPhotos() []*UserResource

func (*User) GetSchemas

func (x *User) GetSchemas() []string

func (*User) GetUserName

func (x *User) GetUserName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect added in v0.89.0

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserName

type UserName struct {

	// Formatted name string
	Formatted string `protobuf:"bytes,1,opt,name=formatted,proto3" json:"formatted,omitempty"`
	// Given name / first name of user
	GivenName string `protobuf:"bytes,2,opt,name=givenName,proto3" json:"givenName,omitempty"`
	// Family name / last name of the user
	FamilyName string `protobuf:"bytes,3,opt,name=familyName,proto3" json:"familyName,omitempty"`
	// contains filtered or unexported fields
}

UserName is the schema used for name of user in SCIM API response

func (*UserName) Descriptor deprecated

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

Deprecated: Use UserName.ProtoReflect.Descriptor instead.

func (*UserName) GetFamilyName

func (x *UserName) GetFamilyName() string

func (*UserName) GetFormatted

func (x *UserName) GetFormatted() string

func (*UserName) GetGivenName

func (x *UserName) GetGivenName() string

func (*UserName) ProtoMessage

func (*UserName) ProtoMessage()

func (*UserName) ProtoReflect added in v0.89.0

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

func (*UserName) Reset

func (x *UserName) Reset()

func (*UserName) String

func (x *UserName) String() string

type UserResource

type UserResource struct {

	// Value of resource example, email address or photo url
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// If set value is used as the primary source of information
	Primary bool `protobuf:"varint,2,opt,name=primary,proto3" json:"primary,omitempty"`
	// Optional value. Sets the type resource example photo
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

UserResource is the schema used for resource like emails / photos of user in SCIM API response

func (*UserResource) Descriptor deprecated

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

Deprecated: Use UserResource.ProtoReflect.Descriptor instead.

func (*UserResource) GetPrimary

func (x *UserResource) GetPrimary() bool

func (*UserResource) GetType

func (x *UserResource) GetType() string

func (*UserResource) GetValue

func (x *UserResource) GetValue() string

func (*UserResource) ProtoMessage

func (*UserResource) ProtoMessage()

func (*UserResource) ProtoReflect added in v0.89.0

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

func (*UserResource) Reset

func (x *UserResource) Reset()

func (*UserResource) String

func (x *UserResource) String() string

Jump to

Keyboard shortcuts

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