Skip to content

Commit

Permalink
refactor: more gRPC endpoints and refactor of HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
antonhagser committed Sep 26, 2023
1 parent f0b6bd9 commit 44ae79c
Show file tree
Hide file tree
Showing 37 changed files with 564 additions and 648 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions SDK/auth-sdk-js/.gitignore

This file was deleted.

96 changes: 0 additions & 96 deletions SDK/auth-sdk-js/package-lock.json

This file was deleted.

20 changes: 0 additions & 20 deletions SDK/auth-sdk-js/package.json

This file was deleted.

35 changes: 0 additions & 35 deletions SDK/auth-sdk-js/src/authContext.tsx

This file was deleted.

1 change: 0 additions & 1 deletion SDK/auth-sdk-js/src/index.ts

This file was deleted.

111 changes: 0 additions & 111 deletions SDK/auth-sdk-js/tsconfig.json

This file was deleted.

2 changes: 2 additions & 0 deletions database/AuthCore/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

DATABASE_URL="postgresql://postgres:vzr3XyG4pxJK7y8D@localhost:5432/authcore"
25 changes: 25 additions & 0 deletions proto/authcore/auth/basic.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";

package authcore.auth.basic;

message RegisterRequest {
string email = 3;
string password = 2;
string application_id = 4;
}

message RegisterResponse {
string user_id = 1;
}

enum ErrorCode {
EmailFormat = 0;
PasswordFormat = 1;
AlreadyExists = 2;
ApplicationDoesNotExist = 3;
InternalServerError = 4;
}

service BasicAuth {
rpc Register(RegisterRequest) returns (RegisterResponse);
}
9 changes: 4 additions & 5 deletions proto/authcore.proto → proto/authcore/authcore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ syntax = "proto3";

package authcore;

message GetAuthCoreVersionRequest {}
message GetVersionRequest {}

message GetAuthCoreVersionResponse {
message GetVersionResponse {
string version = 1;
}

Expand All @@ -20,9 +20,8 @@ message DeleteApplicationRequest {

message DeleteApplicationResponse {}

service AuthCorePlatform {
rpc GetAuthCoreVersion(GetAuthCoreVersionRequest)
returns (GetAuthCoreVersionResponse) {}
service Platform {
rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}

rpc AddApplication(AddApplicationRequest) returns (AddApplicationResponse) {
}
Expand Down
8 changes: 8 additions & 0 deletions proto/authcore/error.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";

package authcore.error;

message DetailedError {
string code = 1;
string message = 2;
}
20 changes: 20 additions & 0 deletions proto/authcore/session.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
syntax = "proto3";

package authcore.session;

message ValidateRequest {
string refreshToken = 1;
}

message ValidateResponse {}

message InvalidateRequest {
string accessToken = 1;
}

message InvalidateResponse {}

service Session {
rpc Validate(ValidateRequest) returns (ValidateResponse) {}
rpc Invalidate(InvalidateRequest) returns (InvalidateResponse) {}
}
Loading

0 comments on commit 44ae79c

Please sign in to comment.