fix(api): naming cleanup in user and session service (#6379)

* fix(api): rename first and last name to given and family name, intent to idp_intent, remove _ actions

* fix merge

* fully rename intent to idp intent in api

---------

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
This commit is contained in:
Livio Spring
2023-08-22 12:05:45 +02:00
committed by GitHub
parent f03a9d03b6
commit a9fb2a6e5c
17 changed files with 146 additions and 145 deletions

View File

@@ -79,7 +79,7 @@ service SessionService {
// Search sessions
rpc ListSessions (ListSessionsRequest) returns (ListSessionsResponse) {
option (google.api.http) = {
post: "/v2alpha/sessions/_search"
post: "/v2alpha/sessions/search"
body: "*"
};
@@ -341,9 +341,9 @@ message Checks {
description: "\"Checks the public key credential issued by the WebAuthN client. Requires that the user is already checked and a WebAuthN challenge to be requested, in any previous request.\"";
}
];
optional CheckIntent intent = 4 [
optional CheckIDPIntent idp_intent = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "\"Checks the intent. Requires that the userlink is already checked and a successful intent.\"";
description: "\"Checks the IDP intent. Requires that the userlink is already checked and a successful idp intent.\"";
}
];
optional CheckTOTP totp = 5 [
@@ -397,20 +397,20 @@ message CheckWebAuthN {
];
}
message CheckIntent {
string intent_id = 1 [
message CheckIDPIntent {
string idp_intent_id = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "ID of the intent, previously returned on the success response of the IDP callback"
description: "ID of the idp intent, previously returned on the success response of the IDP callback"
min_length: 1;
max_length: 200;
example: "\"d654e6ba-70a3-48ef-a95d-37c8d8a7901a\"";
}
];
string token = 2 [
string idp_intent_token = 2 [
(validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "token of the intent, previously returned on the success response of the IDP callback"
description: "token of the idp intent, previously returned on the success response of the IDP callback"
min_length: 1;
max_length: 200;
example: "\"SJKL3ioIDpo342ioqw98fjp3sdf32wahb=\"";

View File

@@ -51,18 +51,18 @@ message RedirectURLs {
];
}
message Intent {
string intent_id = 1 [
message IDPIntent {
string idp_intent_id = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "ID of the intent"
description: "ID of the IDP intent"
min_length: 1;
max_length: 200;
example: "\"163840776835432705=\"";
}
];
string token = 2 [
string idp_intent_token = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "token of the intent"
description: "token of the IDP intent"
min_length: 1;
max_length: 200;
example: "\"SJKL3ioIDpo342ioqw98fjp3sdf32wahb=\"";

View File

@@ -20,7 +20,7 @@ enum Gender {
}
message SetHumanProfile {
string first_name = 1 [
string given_name = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
@@ -29,7 +29,7 @@ message SetHumanProfile {
example: "\"Minnie\"";
}
];
string last_name = 2 [
string family_name = 2 [
(validate.rules).string = {min_len: 1, max_len: 200},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {

View File

@@ -137,7 +137,7 @@ service UserService {
// Verify the email with the provided code
rpc VerifyEmail (VerifyEmailRequest) returns (VerifyEmailResponse) {
option (google.api.http) = {
post: "/v2alpha/users/{user_id}/email/_verify"
post: "/v2alpha/users/{user_id}/email/verify"
body: "*"
};
@@ -187,7 +187,7 @@ service UserService {
// Verify the phone with the provided code
rpc VerifyPhone (VerifyPhoneRequest) returns (VerifyPhoneResponse) {
option (google.api.http) = {
post: "/v2alpha/users/{user_id}/phone/_verify"
post: "/v2alpha/users/{user_id}/phone/verify"
body: "*"
};
@@ -347,7 +347,7 @@ service UserService {
rpc VerifyTOTPRegistration (VerifyTOTPRegistrationRequest) returns (VerifyTOTPRegistrationResponse) {
option (google.api.http) = {
post: "/v2alpha/users/{user_id}/totp/_verify"
post: "/v2alpha/users/{user_id}/totp/verify"
body: "*"
};
@@ -459,9 +459,9 @@ service UserService {
}
// Start an IDP authentication (for external login, registration or linking)
rpc StartIdentityProviderFlow (StartIdentityProviderFlowRequest) returns (StartIdentityProviderFlowResponse) {
rpc StartIdentityProviderIntent (StartIdentityProviderIntentRequest) returns (StartIdentityProviderIntentResponse) {
option (google.api.http) = {
post: "/v2alpha/users/idps/{idp_id}/start"
post: "/v2alpha/idp_intents/start"
body: "*"
};
@@ -483,9 +483,9 @@ service UserService {
};
}
rpc RetrieveIdentityProviderInformation (RetrieveIdentityProviderInformationRequest) returns (RetrieveIdentityProviderInformationResponse) {
rpc RetrieveIdentityProviderIntent (RetrieveIdentityProviderIntentRequest) returns (RetrieveIdentityProviderIntentResponse) {
option (google.api.http) = {
post: "/v2alpha/users/intents/{intent_id}/information"
post: "/v2alpha/idp_intents/{idp_intent_id}"
body: "*"
};
@@ -510,7 +510,7 @@ service UserService {
// Link an IDP to an existing user
rpc AddIDPLink (AddIDPLinkRequest) returns (AddIDPLinkResponse) {
option (google.api.http) = {
post: "/v2alpha/users/users/{user_id}/links"
post: "/v2alpha/users/{user_id}/links"
body: "*"
};
@@ -1072,7 +1072,7 @@ message CreatePasskeyRegistrationLinkResponse{
];
}
message StartIdentityProviderFlowRequest{
message StartIdentityProviderIntentRequest{
string idp_id = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
@@ -1089,7 +1089,7 @@ message StartIdentityProviderFlowRequest{
}
}
message StartIdentityProviderFlowResponse{
message StartIdentityProviderIntentResponse{
zitadel.object.v2alpha.Details details = 1;
oneof next_step {
string auth_url = 2 [
@@ -1098,28 +1098,28 @@ message StartIdentityProviderFlowResponse{
example: "\"https://accounts.google.com/o/oauth2/v2/auth?client_id=clientID&callback=https%3A%2F%2Fzitadel.cloud%2Fidps%2Fcallback\"";
}
];
Intent intent = 3 [
IDPIntent idp_intent = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Intent information"
description: "IDP Intent information"
}
];
}
}
message RetrieveIdentityProviderInformationRequest{
string intent_id = 1 [
message RetrieveIdentityProviderIntentRequest{
string idp_intent_id = 1 [
(validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "ID of the intent, previously returned on the success response of the IDP callback"
description: "ID of the idp intent, previously returned on the success response of the IDP callback"
min_length: 1;
max_length: 200;
example: "\"163840776835432705\"";
}
];
string token = 2 [
string idp_intent_token = 2 [
(validate.rules).string = {min_len: 1, max_len: 200},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "token of the intent, previously returned on the success response of the IDP callback"
description: "token of the idp intent, previously returned on the success response of the IDP callback"
min_length: 1;
max_length: 200;
example: "\"SJKL3ioIDpo342ioqw98fjp3sdf32wahb=\"";
@@ -1127,7 +1127,7 @@ message RetrieveIdentityProviderInformationRequest{
];
}
message RetrieveIdentityProviderInformationResponse{
message RetrieveIdentityProviderIntentResponse{
zitadel.object.v2alpha.Details details = 1;
IDPInformation idp_information = 2;
}