v1

package
v0.88.9 Latest Latest
Warning

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

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

Documentation

Overview

Package scim/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 = 0
	// APIPatchVersion contains patch version of this API
	APIPatchVersion = 1
)

Variables

View Source
var (
	ErrInvalidLengthScim        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowScim          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupScim = fmt.Errorf("proto: unexpected end of group")
)

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.

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response for ListUsers

func (*ListUserResponse) Descriptor

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

func (*ListUserResponse) GetCount

func (m *ListUserResponse) GetCount() int32

func (*ListUserResponse) GetResources

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

func (*ListUserResponse) GetSchemas

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

func (*ListUserResponse) GetStartIndex

func (m *ListUserResponse) GetStartIndex() int32

func (*ListUserResponse) GetTotalResult

func (m *ListUserResponse) GetTotalResult() int32

func (*ListUserResponse) Marshal

func (m *ListUserResponse) Marshal() (dAtA []byte, err error)

func (*ListUserResponse) MarshalTo

func (m *ListUserResponse) MarshalTo(dAtA []byte) (int, error)

func (*ListUserResponse) MarshalToSizedBuffer

func (m *ListUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListUserResponse) ProtoMessage

func (*ListUserResponse) ProtoMessage()

func (*ListUserResponse) Reset

func (m *ListUserResponse) Reset()

func (*ListUserResponse) Size

func (m *ListUserResponse) Size() (n int)

func (*ListUserResponse) String

func (m *ListUserResponse) String() string

func (*ListUserResponse) Unmarshal

func (m *ListUserResponse) Unmarshal(dAtA []byte) error

func (*ListUserResponse) XXX_DiscardUnknown

func (m *ListUserResponse) XXX_DiscardUnknown()

func (*ListUserResponse) XXX_Marshal

func (m *ListUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListUserResponse) XXX_Merge

func (m *ListUserResponse) XXX_Merge(src proto.Message)

func (*ListUserResponse) XXX_Size

func (m *ListUserResponse) XXX_Size() int

func (*ListUserResponse) XXX_Unmarshal

func (m *ListUserResponse) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request params for ListUsers

func (*ListUsersRequest) Descriptor

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

func (*ListUsersRequest) GetCount

func (m *ListUsersRequest) GetCount() int32

func (*ListUsersRequest) GetFilter

func (m *ListUsersRequest) GetFilter() string

func (*ListUsersRequest) GetStartIndex

func (m *ListUsersRequest) GetStartIndex() int32

func (*ListUsersRequest) Marshal

func (m *ListUsersRequest) Marshal() (dAtA []byte, err error)

func (*ListUsersRequest) MarshalTo

func (m *ListUsersRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListUsersRequest) MarshalToSizedBuffer

func (m *ListUsersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListUsersRequest) ProtoMessage

func (*ListUsersRequest) ProtoMessage()

func (*ListUsersRequest) Reset

func (m *ListUsersRequest) Reset()

func (*ListUsersRequest) Size

func (m *ListUsersRequest) Size() (n int)

func (*ListUsersRequest) String

func (m *ListUsersRequest) String() string

func (*ListUsersRequest) Unmarshal

func (m *ListUsersRequest) Unmarshal(dAtA []byte) error

func (*ListUsersRequest) XXX_DiscardUnknown

func (m *ListUsersRequest) XXX_DiscardUnknown()

func (*ListUsersRequest) XXX_Marshal

func (m *ListUsersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListUsersRequest) XXX_Merge

func (m *ListUsersRequest) XXX_Merge(src proto.Message)

func (*ListUsersRequest) XXX_Size

func (m *ListUsersRequest) XXX_Size() int

func (*ListUsersRequest) XXX_Unmarshal

func (m *ListUsersRequest) XXX_Unmarshal(b []byte) error

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 *types.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	// Defines the time at which the resource was updated
	LastModified         *types.Timestamp `protobuf:"bytes,3,opt,name=lastModified,proto3" json:"lastModified,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

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

func (*Metadata) Descriptor

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

func (*Metadata) GetCreated

func (m *Metadata) GetCreated() *types.Timestamp

func (*Metadata) GetLastModified

func (m *Metadata) GetLastModified() *types.Timestamp

func (*Metadata) GetResourceType

func (m *Metadata) GetResourceType() string

func (*Metadata) Marshal

func (m *Metadata) Marshal() (dAtA []byte, err error)

func (*Metadata) MarshalTo

func (m *Metadata) MarshalTo(dAtA []byte) (int, error)

func (*Metadata) MarshalToSizedBuffer

func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) Size

func (m *Metadata) Size() (n int)

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) Unmarshal

func (m *Metadata) Unmarshal(dAtA []byte) error

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metadata) XXX_Merge

func (m *Metadata) XXX_Merge(src proto.Message)

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

func (m *Metadata) XXX_Unmarshal(b []byte) error

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.

func NewSCIMServiceClient

func NewSCIMServiceClient(cc *grpc.ClientConn) SCIMServiceClient

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) AddUser(ctx context.Context, req *User) (*User, error)

func (*UnimplementedSCIMServiceServer) DeleteUser

func (*UnimplementedSCIMServiceServer) GetAPIVersion

func (*UnimplementedSCIMServiceServer) GetAPIVersion(ctx context.Context, req *v1.Empty) (*v1.Version, error)

func (*UnimplementedSCIMServiceServer) GetUser

func (*UnimplementedSCIMServiceServer) ListUsers

func (*UnimplementedSCIMServiceServer) UpdateUser

func (*UnimplementedSCIMServiceServer) UpdateUser(ctx context.Context, req *User) (*User, error)

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*User) Descriptor

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

func (*User) GetActive

func (m *User) GetActive() bool

func (*User) GetDisplayName

func (m *User) GetDisplayName() string

func (*User) GetEmails

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

func (*User) GetExternalId

func (m *User) GetExternalId() string

func (*User) GetId

func (m *User) GetId() string

func (*User) GetLocale

func (m *User) GetLocale() string

func (*User) GetMeta

func (m *User) GetMeta() *Metadata

func (*User) GetName

func (m *User) GetName() *UserName

func (*User) GetNickName

func (m *User) GetNickName() string

func (*User) GetPhotos

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

func (*User) GetSchemas

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

func (*User) GetUserName

func (m *User) GetUserName() string

func (*User) Marshal

func (m *User) Marshal() (dAtA []byte, err error)

func (*User) MarshalTo

func (m *User) MarshalTo(dAtA []byte) (int, error)

func (*User) MarshalToSizedBuffer

func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) Size

func (m *User) Size() (n int)

func (*User) String

func (m *User) String() string

func (*User) Unmarshal

func (m *User) Unmarshal(dAtA []byte) error

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*UserName) Descriptor

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

func (*UserName) GetFamilyName

func (m *UserName) GetFamilyName() string

func (*UserName) GetFormatted

func (m *UserName) GetFormatted() string

func (*UserName) GetGivenName

func (m *UserName) GetGivenName() string

func (*UserName) Marshal

func (m *UserName) Marshal() (dAtA []byte, err error)

func (*UserName) MarshalTo

func (m *UserName) MarshalTo(dAtA []byte) (int, error)

func (*UserName) MarshalToSizedBuffer

func (m *UserName) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserName) ProtoMessage

func (*UserName) ProtoMessage()

func (*UserName) Reset

func (m *UserName) Reset()

func (*UserName) Size

func (m *UserName) Size() (n int)

func (*UserName) String

func (m *UserName) String() string

func (*UserName) Unmarshal

func (m *UserName) Unmarshal(dAtA []byte) error

func (*UserName) XXX_DiscardUnknown

func (m *UserName) XXX_DiscardUnknown()

func (*UserName) XXX_Marshal

func (m *UserName) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserName) XXX_Merge

func (m *UserName) XXX_Merge(src proto.Message)

func (*UserName) XXX_Size

func (m *UserName) XXX_Size() int

func (*UserName) XXX_Unmarshal

func (m *UserName) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*UserResource) Descriptor

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

func (*UserResource) GetPrimary

func (m *UserResource) GetPrimary() bool

func (*UserResource) GetType

func (m *UserResource) GetType() string

func (*UserResource) GetValue

func (m *UserResource) GetValue() string

func (*UserResource) Marshal

func (m *UserResource) Marshal() (dAtA []byte, err error)

func (*UserResource) MarshalTo

func (m *UserResource) MarshalTo(dAtA []byte) (int, error)

func (*UserResource) MarshalToSizedBuffer

func (m *UserResource) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserResource) ProtoMessage

func (*UserResource) ProtoMessage()

func (*UserResource) Reset

func (m *UserResource) Reset()

func (*UserResource) Size

func (m *UserResource) Size() (n int)

func (*UserResource) String

func (m *UserResource) String() string

func (*UserResource) Unmarshal

func (m *UserResource) Unmarshal(dAtA []byte) error

func (*UserResource) XXX_DiscardUnknown

func (m *UserResource) XXX_DiscardUnknown()

func (*UserResource) XXX_Marshal

func (m *UserResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserResource) XXX_Merge

func (m *UserResource) XXX_Merge(src proto.Message)

func (*UserResource) XXX_Size

func (m *UserResource) XXX_Size() int

func (*UserResource) XXX_Unmarshal

func (m *UserResource) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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