mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-13 04:58:09 +00:00
Implement Clerk as authentication backend (OAuth2).
This commit is contained in:
437
api/python/proto/chirpstack-api/api/internal.proto
vendored
437
api/python/proto/chirpstack-api/api/internal.proto
vendored
@ -15,361 +15,396 @@ import "chirpstack-api/api/user.proto";
|
||||
|
||||
// InternalService is the service providing API endpoints for internal usage.
|
||||
service InternalService {
|
||||
// Log in a user
|
||||
rpc Login(LoginRequest) returns (LoginResponse) {}
|
||||
// Log in a user
|
||||
rpc Login(LoginRequest) returns (LoginResponse) {}
|
||||
|
||||
// Get the current user's profile
|
||||
rpc Profile(google.protobuf.Empty) returns (ProfileResponse) {}
|
||||
// Get the current user's profile
|
||||
rpc Profile(google.protobuf.Empty) returns (ProfileResponse) {}
|
||||
|
||||
// Perform a global search.
|
||||
rpc GlobalSearch(GlobalSearchRequest) returns (GlobalSearchResponse) {}
|
||||
// Perform a global search.
|
||||
rpc GlobalSearch(GlobalSearchRequest) returns (GlobalSearchResponse) {}
|
||||
|
||||
// CreateApiKey creates the given API key.
|
||||
rpc CreateApiKey(CreateApiKeyRequest) returns (CreateApiKeyResponse) {}
|
||||
// CreateApiKey creates the given API key.
|
||||
rpc CreateApiKey(CreateApiKeyRequest) returns (CreateApiKeyResponse) {}
|
||||
|
||||
// DeleteApiKey deletes the API key.
|
||||
rpc DeleteApiKey(DeleteApiKeyRequest) returns (google.protobuf.Empty) {}
|
||||
// DeleteApiKey deletes the API key.
|
||||
rpc DeleteApiKey(DeleteApiKeyRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// ListApiKeys lists the available API keys.
|
||||
rpc ListApiKeys(ListApiKeysRequest) returns (ListApiKeysResponse) {}
|
||||
// ListApiKeys lists the available API keys.
|
||||
rpc ListApiKeys(ListApiKeysRequest) returns (ListApiKeysResponse) {}
|
||||
|
||||
// Get the global settings.
|
||||
rpc Settings(google.protobuf.Empty) returns (SettingsResponse) {}
|
||||
// Get the global settings.
|
||||
rpc Settings(google.protobuf.Empty) returns (SettingsResponse) {}
|
||||
|
||||
// OpenId Connect login.
|
||||
rpc OpenIdConnectLogin(OpenIdConnectLoginRequest) returns (OpenIdConnectLoginResponse) {}
|
||||
// OpenId Connect login.
|
||||
rpc OpenIdConnectLogin(OpenIdConnectLoginRequest)
|
||||
returns (OpenIdConnectLoginResponse) {}
|
||||
|
||||
// GetDevicesSummary returns an aggregated summary of the devices.
|
||||
rpc GetDevicesSummary(GetDevicesSummaryRequest) returns (GetDevicesSummaryResponse) {}
|
||||
// OAuth2 login.
|
||||
rpc OAuth2Login(OAuth2LoginRequest) returns (OAuth2LoginResponse) {}
|
||||
|
||||
// GetGatewaysSummary returns an aggregated summary of the gateways.
|
||||
rpc GetGatewaysSummary(GetGatewaysSummaryRequest) returns (GetGatewaysSummaryResponse) {}
|
||||
// GetDevicesSummary returns an aggregated summary of the devices.
|
||||
rpc GetDevicesSummary(GetDevicesSummaryRequest)
|
||||
returns (GetDevicesSummaryResponse) {}
|
||||
|
||||
// Stream frame for the given Gateway ID.
|
||||
rpc StreamGatewayFrames(StreamGatewayFramesRequest) returns (stream LogItem) {}
|
||||
// GetGatewaysSummary returns an aggregated summary of the gateways.
|
||||
rpc GetGatewaysSummary(GetGatewaysSummaryRequest)
|
||||
returns (GetGatewaysSummaryResponse) {}
|
||||
|
||||
// Stream frames for the given Device EUI.
|
||||
rpc StreamDeviceFrames(StreamDeviceFramesRequest) returns (stream LogItem) {}
|
||||
// Stream frame for the given Gateway ID.
|
||||
rpc StreamGatewayFrames(StreamGatewayFramesRequest) returns (stream LogItem) {
|
||||
}
|
||||
|
||||
// Stream events for the given Device EUI.
|
||||
rpc StreamDeviceEvents(StreamDeviceEventsRequest) returns (stream LogItem) {}
|
||||
// Stream frames for the given Device EUI.
|
||||
rpc StreamDeviceFrames(StreamDeviceFramesRequest) returns (stream LogItem) {}
|
||||
|
||||
// ListRegions lists the available (configured) regions.
|
||||
rpc ListRegions(google.protobuf.Empty) returns (ListRegionsResponse) {}
|
||||
// Stream events for the given Device EUI.
|
||||
rpc StreamDeviceEvents(StreamDeviceEventsRequest) returns (stream LogItem) {}
|
||||
|
||||
// GetRegion returns the region details for the given region.
|
||||
rpc GetRegion(GetRegionRequest) returns (GetRegionResponse) {}
|
||||
// ListRegions lists the available (configured) regions.
|
||||
rpc ListRegions(google.protobuf.Empty) returns (ListRegionsResponse) {}
|
||||
|
||||
// GetRegion returns the region details for the given region.
|
||||
rpc GetRegion(GetRegionRequest) returns (GetRegionResponse) {}
|
||||
}
|
||||
|
||||
message ApiKey {
|
||||
// API key ID.
|
||||
// This value will be automatically generated on create.
|
||||
string id = 1;
|
||||
// API key ID.
|
||||
// This value will be automatically generated on create.
|
||||
string id = 1;
|
||||
|
||||
// Name.
|
||||
string name = 2;
|
||||
// Name.
|
||||
string name = 2;
|
||||
|
||||
// Is global admin key.
|
||||
bool is_admin = 3;
|
||||
// Is global admin key.
|
||||
bool is_admin = 3;
|
||||
|
||||
// Tenant ID.
|
||||
// In case the API key is intended to manage resources under a single tenant.
|
||||
string tenant_id = 4;
|
||||
// Tenant ID.
|
||||
// In case the API key is intended to manage resources under a single tenant.
|
||||
string tenant_id = 4;
|
||||
}
|
||||
|
||||
message CreateApiKeyRequest {
|
||||
// The API key to create.
|
||||
ApiKey api_key = 1;
|
||||
// The API key to create.
|
||||
ApiKey api_key = 1;
|
||||
}
|
||||
|
||||
message CreateApiKeyResponse {
|
||||
// API key ID.
|
||||
string id = 1;
|
||||
// API key ID.
|
||||
string id = 1;
|
||||
|
||||
// API token for authentication API requests.
|
||||
string token = 2;
|
||||
// API token for authentication API requests.
|
||||
string token = 2;
|
||||
}
|
||||
|
||||
message DeleteApiKeyRequest {
|
||||
// API key ID.
|
||||
string id = 1;
|
||||
// API key ID.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message ListApiKeysRequest {
|
||||
// Max number of items to return.
|
||||
uint32 limit = 1;
|
||||
// Max number of items to return.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
uint32 offset = 2;
|
||||
// Offset in the result-set (for pagination).
|
||||
uint32 offset = 2;
|
||||
|
||||
// Return only admin keys.
|
||||
bool is_admin = 3;
|
||||
// Return only admin keys.
|
||||
bool is_admin = 3;
|
||||
|
||||
// Filter on tenant ID.
|
||||
string tenant_id = 4;
|
||||
// Filter on tenant ID.
|
||||
string tenant_id = 4;
|
||||
}
|
||||
|
||||
message ListApiKeysResponse {
|
||||
// Total number of API keys.
|
||||
uint32 total_count = 1;
|
||||
// Total number of API keys.
|
||||
uint32 total_count = 1;
|
||||
|
||||
repeated ApiKey result = 2;
|
||||
repeated ApiKey result = 2;
|
||||
}
|
||||
|
||||
// Defines a tenant to which the user is associated.
|
||||
message UserTenantLink {
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 1;
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 1;
|
||||
|
||||
// Last update timestamp.
|
||||
google.protobuf.Timestamp updated_at = 2;
|
||||
// Last update timestamp.
|
||||
google.protobuf.Timestamp updated_at = 2;
|
||||
|
||||
// Tenant ID.
|
||||
string tenant_id = 3;
|
||||
// Tenant ID.
|
||||
string tenant_id = 3;
|
||||
|
||||
// User is admin within the context of this tenant.
|
||||
// There is no need to set the is_device_admin and is_gateway_admin flags.
|
||||
bool is_admin = 4;
|
||||
// User is admin within the context of this tenant.
|
||||
// There is no need to set the is_device_admin and is_gateway_admin flags.
|
||||
bool is_admin = 4;
|
||||
|
||||
// User is able to modify device related resources (applications,
|
||||
// device-profiles, devices, multicast-groups).
|
||||
bool is_device_admin = 5;
|
||||
// User is able to modify device related resources (applications,
|
||||
// device-profiles, devices, multicast-groups).
|
||||
bool is_device_admin = 5;
|
||||
|
||||
// User is able to modify gateways.
|
||||
bool is_gateway_admin = 6;
|
||||
// User is able to modify gateways.
|
||||
bool is_gateway_admin = 6;
|
||||
}
|
||||
|
||||
message LoginRequest {
|
||||
// Email of the user.
|
||||
string email = 1;
|
||||
// Email of the user.
|
||||
string email = 1;
|
||||
|
||||
// Password of the user.
|
||||
string password = 2;
|
||||
// Password of the user.
|
||||
string password = 2;
|
||||
}
|
||||
|
||||
message LoginResponse {
|
||||
// The JWT tag to be used to access chirpstack-application-server interfaces.
|
||||
string jwt = 1;
|
||||
// The JWT tag to be used to access chirpstack-application-server interfaces.
|
||||
string jwt = 1;
|
||||
}
|
||||
|
||||
message ProfileResponse {
|
||||
// User object.
|
||||
User user = 1;
|
||||
// User object.
|
||||
User user = 1;
|
||||
|
||||
// Tenants to which the user is associated.
|
||||
repeated UserTenantLink tenants = 3;
|
||||
// Tenants to which the user is associated.
|
||||
repeated UserTenantLink tenants = 3;
|
||||
}
|
||||
|
||||
message GlobalSearchRequest {
|
||||
// Search query.
|
||||
string search = 1;
|
||||
// Search query.
|
||||
string search = 1;
|
||||
|
||||
// Max number of results to return.
|
||||
int64 limit = 2;
|
||||
// Max number of results to return.
|
||||
int64 limit = 2;
|
||||
|
||||
// Offset offset of the result-set (for pagination).
|
||||
int64 offset = 3;
|
||||
// Offset offset of the result-set (for pagination).
|
||||
int64 offset = 3;
|
||||
}
|
||||
|
||||
message GlobalSearchResponse {
|
||||
repeated GlobalSearchResult result = 1;
|
||||
}
|
||||
message GlobalSearchResponse { repeated GlobalSearchResult result = 1; }
|
||||
|
||||
message GlobalSearchResult {
|
||||
// Record kind.
|
||||
string kind = 1;
|
||||
// Record kind.
|
||||
string kind = 1;
|
||||
|
||||
// Search score.
|
||||
float score = 2;
|
||||
// Search score.
|
||||
float score = 2;
|
||||
|
||||
// Organization id.
|
||||
string tenant_id = 3;
|
||||
// Organization id.
|
||||
string tenant_id = 3;
|
||||
|
||||
// Organization name.
|
||||
string tenant_name = 4;
|
||||
// Organization name.
|
||||
string tenant_name = 4;
|
||||
|
||||
// Application id.
|
||||
string application_id = 5;
|
||||
// Application id.
|
||||
string application_id = 5;
|
||||
|
||||
// Application name.
|
||||
string application_name = 6;
|
||||
// Application name.
|
||||
string application_name = 6;
|
||||
|
||||
// Device DevEUI (hex encoded).
|
||||
string device_dev_eui = 7;
|
||||
// Device DevEUI (hex encoded).
|
||||
string device_dev_eui = 7;
|
||||
|
||||
// Device name.
|
||||
string device_name = 8;
|
||||
// Device name.
|
||||
string device_name = 8;
|
||||
|
||||
// Gateway MAC (hex encoded).
|
||||
string gateway_id = 9;
|
||||
// Gateway MAC (hex encoded).
|
||||
string gateway_id = 9;
|
||||
|
||||
// Gateway name.
|
||||
string gateway_name = 10;
|
||||
// Gateway name.
|
||||
string gateway_name = 10;
|
||||
}
|
||||
|
||||
message SettingsResponse {
|
||||
// OpenId Connect settings.
|
||||
OpenIdConnect openid_connect = 1;
|
||||
// OpenId Connect settings.
|
||||
OpenIdConnect openid_connect = 1;
|
||||
|
||||
// OAuth2 settings.
|
||||
OAuth2 oauth2 = 2;
|
||||
}
|
||||
|
||||
message OpenIdConnect {
|
||||
// Enable OpenId Connect authentication.
|
||||
bool enabled = 1;
|
||||
// Enable OpenId Connect authentication.
|
||||
bool enabled = 1;
|
||||
|
||||
// Login url.
|
||||
string login_url = 2 [json_name = "loginURL"];
|
||||
// Login url.
|
||||
string login_url = 2;
|
||||
|
||||
// Login label.
|
||||
string login_label = 3;
|
||||
// Login label.
|
||||
string login_label = 3;
|
||||
|
||||
// Logout url.
|
||||
string logout_url = 4 [json_name = "logoutURL"];
|
||||
// Logout url.
|
||||
string logout_url = 4;
|
||||
}
|
||||
|
||||
message OAuth2 {
|
||||
// OAuth2 is enabled.
|
||||
bool enabled = 1;
|
||||
|
||||
// Login url.
|
||||
string login_url = 2;
|
||||
|
||||
// Login label.
|
||||
string login_label = 3;
|
||||
|
||||
// Logout url.
|
||||
string logout_url = 4;
|
||||
}
|
||||
|
||||
message OpenIdConnectLoginRequest {
|
||||
// OpenId Connect callback code.
|
||||
string code = 1;
|
||||
// OpenId Connect callback code.
|
||||
string code = 1;
|
||||
|
||||
// OpenId Connect callback state.
|
||||
string state = 2;
|
||||
// OpenId Connect callback state.
|
||||
string state = 2;
|
||||
}
|
||||
|
||||
message OpenIdConnectLoginResponse {
|
||||
// Token to use for authentication.
|
||||
string token = 1;
|
||||
// Token to use for authentication.
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message OAuth2LoginRequest {
|
||||
// OAuth2 callback code.
|
||||
string code = 1;
|
||||
|
||||
// OAuth2 callback state.
|
||||
string state = 2;
|
||||
}
|
||||
|
||||
message OAuth2LoginResponse {
|
||||
// Token to use for authentication.
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message GetDevicesSummaryRequest {
|
||||
// Tenant ID (UUID).
|
||||
string tenant_id = 1;
|
||||
// Tenant ID (UUID).
|
||||
string tenant_id = 1;
|
||||
}
|
||||
|
||||
message GetDevicesSummaryResponse {
|
||||
// Active count.
|
||||
uint32 active_count = 1;
|
||||
// Active count.
|
||||
uint32 active_count = 1;
|
||||
|
||||
// Inactive count.
|
||||
uint32 inactive_count = 2;
|
||||
// Inactive count.
|
||||
uint32 inactive_count = 2;
|
||||
|
||||
// per data-rate count.
|
||||
// Devices that have never been seen are excluded.
|
||||
map<uint32, uint32> dr_count = 3;
|
||||
// per data-rate count.
|
||||
// Devices that have never been seen are excluded.
|
||||
map<uint32, uint32> dr_count = 3;
|
||||
|
||||
// Never seen count.
|
||||
uint32 never_seen_count = 4;
|
||||
// Never seen count.
|
||||
uint32 never_seen_count = 4;
|
||||
}
|
||||
|
||||
message GetGatewaysSummaryRequest {
|
||||
// Tenant ID (UUID).
|
||||
string tenant_id = 1;
|
||||
// Tenant ID (UUID).
|
||||
string tenant_id = 1;
|
||||
}
|
||||
|
||||
message GetGatewaysSummaryResponse {
|
||||
// Online count.
|
||||
uint32 online_count = 1;
|
||||
// Online count.
|
||||
uint32 online_count = 1;
|
||||
|
||||
// Offline count.
|
||||
uint32 offline_count = 2;
|
||||
// Offline count.
|
||||
uint32 offline_count = 2;
|
||||
|
||||
// Never seen count.
|
||||
uint32 never_seen_count = 3;
|
||||
// Never seen count.
|
||||
uint32 never_seen_count = 3;
|
||||
}
|
||||
|
||||
message LogItem {
|
||||
// ID.
|
||||
string id = 1;
|
||||
// ID.
|
||||
string id = 1;
|
||||
|
||||
// Timestamp.
|
||||
google.protobuf.Timestamp time = 2;
|
||||
// Timestamp.
|
||||
google.protobuf.Timestamp time = 2;
|
||||
|
||||
// Message.
|
||||
string description = 3;
|
||||
// Message.
|
||||
string description = 3;
|
||||
|
||||
// Body.
|
||||
string body = 4;
|
||||
// Body.
|
||||
string body = 4;
|
||||
|
||||
// Properties.
|
||||
map<string, string> properties = 5;
|
||||
// Properties.
|
||||
map<string, string> properties = 5;
|
||||
}
|
||||
|
||||
message StreamGatewayFramesRequest {
|
||||
// Gateway ID (EUI64).
|
||||
string gateway_id = 1;
|
||||
// Gateway ID (EUI64).
|
||||
string gateway_id = 1;
|
||||
}
|
||||
|
||||
message StreamDeviceFramesRequest {
|
||||
// Device EUI.
|
||||
string dev_eui = 1;
|
||||
// Device EUI.
|
||||
string dev_eui = 1;
|
||||
}
|
||||
|
||||
message StreamDeviceEventsRequest {
|
||||
// Device EUI.
|
||||
string dev_eui = 1;
|
||||
// Device EUI.
|
||||
string dev_eui = 1;
|
||||
}
|
||||
|
||||
message ListRegionsResponse {
|
||||
// Configured regions.
|
||||
repeated RegionListItem regions = 1;
|
||||
// Configured regions.
|
||||
repeated RegionListItem regions = 1;
|
||||
}
|
||||
|
||||
message RegionListItem {
|
||||
// ID.
|
||||
string id = 1;
|
||||
// ID.
|
||||
string id = 1;
|
||||
|
||||
// Region.
|
||||
common.Region region = 2;
|
||||
// Region.
|
||||
common.Region region = 2;
|
||||
|
||||
// Description.
|
||||
string description = 3;
|
||||
// Description.
|
||||
string description = 3;
|
||||
}
|
||||
|
||||
message GetRegionRequest {
|
||||
// Region ID.
|
||||
string id = 1;
|
||||
// Region ID.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetRegionResponse {
|
||||
// ID.
|
||||
string id = 1;
|
||||
// ID.
|
||||
string id = 1;
|
||||
|
||||
// Region.
|
||||
common.Region region = 2;
|
||||
// Region.
|
||||
common.Region region = 2;
|
||||
|
||||
// User information.
|
||||
string user_info = 3;
|
||||
// User information.
|
||||
string user_info = 3;
|
||||
|
||||
// Uplink channels.
|
||||
repeated RegionChannel uplink_channels = 4;
|
||||
// Uplink channels.
|
||||
repeated RegionChannel uplink_channels = 4;
|
||||
|
||||
// RX1 delay.
|
||||
uint32 rx1_delay = 5;
|
||||
// RX1 delay.
|
||||
uint32 rx1_delay = 5;
|
||||
|
||||
// RX1 data-rate offset.
|
||||
uint32 rx1_dr_offset = 6;
|
||||
// RX1 data-rate offset.
|
||||
uint32 rx1_dr_offset = 6;
|
||||
|
||||
// RX2 DR.
|
||||
uint32 rx2_dr = 7;
|
||||
// RX2 DR.
|
||||
uint32 rx2_dr = 7;
|
||||
|
||||
// RX2 frequency.
|
||||
uint32 rx2_frequency = 8;
|
||||
// RX2 frequency.
|
||||
uint32 rx2_frequency = 8;
|
||||
|
||||
// Class-B ping-slot DR.
|
||||
uint32 class_b_ping_slot_dr = 9;
|
||||
// Class-B ping-slot DR.
|
||||
uint32 class_b_ping_slot_dr = 9;
|
||||
|
||||
// Class-B ping-slot frequency.
|
||||
uint32 class_b_ping_slot_frequency = 10;
|
||||
// Class-B ping-slot frequency.
|
||||
uint32 class_b_ping_slot_frequency = 10;
|
||||
|
||||
// Region description.
|
||||
string description = 11;
|
||||
// Region description.
|
||||
string description = 11;
|
||||
}
|
||||
|
||||
message RegionChannel {
|
||||
// Frequency (Hz).
|
||||
uint32 frequency = 1;
|
||||
// Frequency (Hz).
|
||||
uint32 frequency = 1;
|
||||
|
||||
// Min DR.
|
||||
uint32 dr_min = 2;
|
||||
// Min DR.
|
||||
uint32 dr_min = 2;
|
||||
|
||||
// Max DR.
|
||||
uint32 dr_max = 3;
|
||||
// Max DR.
|
||||
uint32 dr_max = 3;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -140,10 +140,12 @@ class GlobalSearchResult(_message.Message):
|
||||
def __init__(self, kind: _Optional[str] = ..., score: _Optional[float] = ..., tenant_id: _Optional[str] = ..., tenant_name: _Optional[str] = ..., application_id: _Optional[str] = ..., application_name: _Optional[str] = ..., device_dev_eui: _Optional[str] = ..., device_name: _Optional[str] = ..., gateway_id: _Optional[str] = ..., gateway_name: _Optional[str] = ...) -> None: ...
|
||||
|
||||
class SettingsResponse(_message.Message):
|
||||
__slots__ = ["openid_connect"]
|
||||
__slots__ = ["openid_connect", "oauth2"]
|
||||
OPENID_CONNECT_FIELD_NUMBER: _ClassVar[int]
|
||||
OAUTH2_FIELD_NUMBER: _ClassVar[int]
|
||||
openid_connect: OpenIdConnect
|
||||
def __init__(self, openid_connect: _Optional[_Union[OpenIdConnect, _Mapping]] = ...) -> None: ...
|
||||
oauth2: OAuth2
|
||||
def __init__(self, openid_connect: _Optional[_Union[OpenIdConnect, _Mapping]] = ..., oauth2: _Optional[_Union[OAuth2, _Mapping]] = ...) -> None: ...
|
||||
|
||||
class OpenIdConnect(_message.Message):
|
||||
__slots__ = ["enabled", "login_url", "login_label", "logout_url"]
|
||||
@ -157,6 +159,18 @@ class OpenIdConnect(_message.Message):
|
||||
logout_url: str
|
||||
def __init__(self, enabled: bool = ..., login_url: _Optional[str] = ..., login_label: _Optional[str] = ..., logout_url: _Optional[str] = ...) -> None: ...
|
||||
|
||||
class OAuth2(_message.Message):
|
||||
__slots__ = ["enabled", "login_url", "login_label", "logout_url"]
|
||||
ENABLED_FIELD_NUMBER: _ClassVar[int]
|
||||
LOGIN_URL_FIELD_NUMBER: _ClassVar[int]
|
||||
LOGIN_LABEL_FIELD_NUMBER: _ClassVar[int]
|
||||
LOGOUT_URL_FIELD_NUMBER: _ClassVar[int]
|
||||
enabled: bool
|
||||
login_url: str
|
||||
login_label: str
|
||||
logout_url: str
|
||||
def __init__(self, enabled: bool = ..., login_url: _Optional[str] = ..., login_label: _Optional[str] = ..., logout_url: _Optional[str] = ...) -> None: ...
|
||||
|
||||
class OpenIdConnectLoginRequest(_message.Message):
|
||||
__slots__ = ["code", "state"]
|
||||
CODE_FIELD_NUMBER: _ClassVar[int]
|
||||
@ -171,6 +185,20 @@ class OpenIdConnectLoginResponse(_message.Message):
|
||||
token: str
|
||||
def __init__(self, token: _Optional[str] = ...) -> None: ...
|
||||
|
||||
class OAuth2LoginRequest(_message.Message):
|
||||
__slots__ = ["code", "state"]
|
||||
CODE_FIELD_NUMBER: _ClassVar[int]
|
||||
STATE_FIELD_NUMBER: _ClassVar[int]
|
||||
code: str
|
||||
state: str
|
||||
def __init__(self, code: _Optional[str] = ..., state: _Optional[str] = ...) -> None: ...
|
||||
|
||||
class OAuth2LoginResponse(_message.Message):
|
||||
__slots__ = ["token"]
|
||||
TOKEN_FIELD_NUMBER: _ClassVar[int]
|
||||
token: str
|
||||
def __init__(self, token: _Optional[str] = ...) -> None: ...
|
||||
|
||||
class GetDevicesSummaryRequest(_message.Message):
|
||||
__slots__ = ["tenant_id"]
|
||||
TENANT_ID_FIELD_NUMBER: _ClassVar[int]
|
||||
|
@ -56,6 +56,11 @@ class InternalServiceStub(object):
|
||||
request_serializer=chirpstack__api_dot_api_dot_internal__pb2.OpenIdConnectLoginRequest.SerializeToString,
|
||||
response_deserializer=chirpstack__api_dot_api_dot_internal__pb2.OpenIdConnectLoginResponse.FromString,
|
||||
)
|
||||
self.OAuth2Login = channel.unary_unary(
|
||||
'/api.InternalService/OAuth2Login',
|
||||
request_serializer=chirpstack__api_dot_api_dot_internal__pb2.OAuth2LoginRequest.SerializeToString,
|
||||
response_deserializer=chirpstack__api_dot_api_dot_internal__pb2.OAuth2LoginResponse.FromString,
|
||||
)
|
||||
self.GetDevicesSummary = channel.unary_unary(
|
||||
'/api.InternalService/GetDevicesSummary',
|
||||
request_serializer=chirpstack__api_dot_api_dot_internal__pb2.GetDevicesSummaryRequest.SerializeToString,
|
||||
@ -153,6 +158,13 @@ class InternalServiceServicer(object):
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def OAuth2Login(self, request, context):
|
||||
"""OAuth2 login.
|
||||
"""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def GetDevicesSummary(self, request, context):
|
||||
"""GetDevicesSummary returns an aggregated summary of the devices.
|
||||
"""
|
||||
@ -245,6 +257,11 @@ def add_InternalServiceServicer_to_server(servicer, server):
|
||||
request_deserializer=chirpstack__api_dot_api_dot_internal__pb2.OpenIdConnectLoginRequest.FromString,
|
||||
response_serializer=chirpstack__api_dot_api_dot_internal__pb2.OpenIdConnectLoginResponse.SerializeToString,
|
||||
),
|
||||
'OAuth2Login': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.OAuth2Login,
|
||||
request_deserializer=chirpstack__api_dot_api_dot_internal__pb2.OAuth2LoginRequest.FromString,
|
||||
response_serializer=chirpstack__api_dot_api_dot_internal__pb2.OAuth2LoginResponse.SerializeToString,
|
||||
),
|
||||
'GetDevicesSummary': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.GetDevicesSummary,
|
||||
request_deserializer=chirpstack__api_dot_api_dot_internal__pb2.GetDevicesSummaryRequest.FromString,
|
||||
@ -427,6 +444,23 @@ class InternalService(object):
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def OAuth2Login(request,
|
||||
target,
|
||||
options=(),
|
||||
channel_credentials=None,
|
||||
call_credentials=None,
|
||||
insecure=False,
|
||||
compression=None,
|
||||
wait_for_ready=None,
|
||||
timeout=None,
|
||||
metadata=None):
|
||||
return grpc.experimental.unary_unary(request, target, '/api.InternalService/OAuth2Login',
|
||||
chirpstack__api_dot_api_dot_internal__pb2.OAuth2LoginRequest.SerializeToString,
|
||||
chirpstack__api_dot_api_dot_internal__pb2.OAuth2LoginResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def GetDevicesSummary(request,
|
||||
target,
|
||||
|
Reference in New Issue
Block a user