-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1093 from flipt-io/gm/authentication-protobuf
feat(rpc): define auth protobuf package and Authentication model
- Loading branch information
Showing
4 changed files
with
398 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.