-
Notifications
You must be signed in to change notification settings - Fork 29
/
resources.proto
78 lines (71 loc) · 2.4 KB
/
resources.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Copyright 2018-2019 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// In applying this license, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
syntax = "proto3";
package cs3.identity.user.v1beta1;
option csharp_namespace = "Cs3.Identity.User.V1Beta1";
option go_package = "userv1beta1";
option java_multiple_files = true;
option java_outer_classname = "ResourcesProto";
option java_package = "com.cs3.identity.user.v1beta1";
option objc_class_prefix = "CIU";
option php_namespace = "Cs3\\Identity\\User\\V1Beta1";
import "cs3/types/v1beta1/types.proto";
// A UserId represents a user.
message UserId {
// REQUIRED.
// The identity provider for the user.
string idp = 1;
// REQUIRED.
// the unique identifier for the user in the scope of
// the identity provider.
string opaque_id = 2;
// REQUIRED.
// The type of user.
UserType type = 3;
}
// Represents a user of the system.
message User {
UserId id = 1;
string username = 2;
string mail = 3;
bool mail_verified = 4;
string display_name = 5;
repeated string groups = 6;
cs3.types.v1beta1.Opaque opaque = 7;
int64 uid_number = 8;
int64 gid_number = 9;
}
// The type of user.
enum UserType {
// The user is invalid, for example, is missing primary attributes.
USER_TYPE_INVALID = 0;
// A primary user.
USER_TYPE_PRIMARY = 1;
// A secondary user for cases with multiple identities.
USER_TYPE_SECONDARY = 2;
// A user catering to specific services.
USER_TYPE_SERVICE = 3;
// A user to be used by specific applications.
USER_TYPE_APPLICATION = 4;
// A guest user not affiliated to the IDP.
USER_TYPE_GUEST = 5;
// A federated user provided by external IDPs.
USER_TYPE_FEDERATED = 6;
// A lightweight user account without access to various major functionalities.
USER_TYPE_LIGHTWEIGHT = 7;
}