Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rpc): define auth protobuf package and Authentication model #1093

Merged
merged 4 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
version: v1
plugins:
# core apis
- name: go
out: rpc/flipt
opt:
- paths=source_relative
strategy: all
- name: go-grpc
out: rpc/flipt
opt:
- paths=source_relative
strategy: all
- name: grpc-gateway
out: rpc/flipt
opt:
- paths=source_relative
- grpc_api_configuration=rpc/flipt/flipt.yaml
strategy: all
- name: openapiv2
out: swagger
opt:
- grpc_api_configuration=rpc/flipt/flipt.yaml
strategy: all
287 changes: 287 additions & 0 deletions rpc/flipt/auth/auth.pb.go

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

46 changes: 46 additions & 0 deletions rpc/flipt/auth/auth.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
syntax = "proto3";

import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";

package flipt.auth;

option go_package = "go.flipt.io/flipt/rpc/flipt/auth";

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Flipt Authentication APIs";
version: "latest";
contact: {
name: "Flipt Team";
url: "https://github.com/flipt-io/flipt";
email: "[email protected]"
};
license: {
name: "MIT License";
url: "https://github.com/flipt-io/flipt/blob/main/rpc/flipt/LICENSE";
};
};
external_docs: {
url: "https://www.flipt.io/docs";
description: "Flipt Docs";
}
schemes: HTTP;
schemes: HTTPS;
consumes: "application/json";
produces: "application/json";
};

enum Method {
NONE = 0;
TOKEN = 1;
}

message Authentication {
string id = 1;
Method method = 2;
google.protobuf.Timestamp expires_at = 3;
google.protobuf.Timestamp created_at = 4;
google.protobuf.Timestamp updated_at = 5;
map<string, string> metadata = 6;
}
Loading