From 607a9943e61c49470df0277e502cfbf6e52d367b Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Fri, 16 Nov 2018 18:35:31 +0300 Subject: [PATCH 1/7] Preliminary gRPC support; tentative proto file and stubbed server implementation --- Makefile | 22 + go.mod | 16 +- go.sum | 45 +- grpc/authn.pb.go | 7899 +++++++++++++++++++++++++++++++++++++++++ grpc/authn.pb.gw.go | 956 +++++ grpc/authn.pb_test.go | 8 + grpc/authn.proto | 246 ++ grpc/server.go | 149 + 8 files changed, 9318 insertions(+), 23 deletions(-) create mode 100644 grpc/authn.pb.go create mode 100644 grpc/authn.pb.gw.go create mode 100644 grpc/authn.pb_test.go create mode 100644 grpc/authn.proto create mode 100644 grpc/server.go diff --git a/Makefile b/Makefile index 03d1c86d5e..a4227ddb7e 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ PROJECT := authn-server NAME := $(ORG)/$(PROJECT) VERSION := 1.4.1 MAIN := main.go routing.go +GATEWAY_SRC:= $(shell go list -f '{{ .Dir }}' -m github.com/grpc-ecosystem/grpc-gateway) .PHONY: clean clean: @@ -101,3 +102,24 @@ release: test dist git push --tags open https://github.com/$(NAME)/releases/tag/v$(VERSION) open dist + +.PHONY: generate-grpc +generate-grpc: + protoc -I=./grpc -I=vendor -I=$(GATEWAY_SRC)/third_party/googleapis --gogoslick_out=\ + Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,plugins=grpc:./grpc \ + --grpc-gateway_out=\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ + Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\ + Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:./grpc \ + grpc/authn.proto + # Workaround for https://github.com/grpc-ecosystem/grpc-gateway/issues/229. + sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn.pb.gw.go && rm grpc/authn.pb.gw.go.bak + sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn.pb.go && rm grpc/authn.pb.go.bak \ No newline at end of file diff --git a/go.mod b/go.mod index 09ceda6e0e..3e8d88de70 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,7 @@ module github.com/keratin/authn-server require ( - cloud.google.com/go v0.0.0-20180417120045-d19004dbbee5 // indirect github.com/airbrake/gobrake v3.5.0+incompatible - github.com/benbjohnson/ego v0.3.0 // indirect github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a // indirect github.com/certifi/gocertifi v0.0.0-20170727155124-3fd9e1adb12b // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -12,10 +10,13 @@ require ( github.com/getsentry/raven-go v0.0.0-20170614100719-d175f85701df github.com/go-redis/redis v6.10.2+incompatible github.com/go-sql-driver/mysql v1.3.0 - github.com/golang/protobuf v0.0.0-20171021043952-1643683e1b54 // indirect + github.com/gogo/googleapis v1.1.0 + github.com/gogo/protobuf v1.1.1 + github.com/golang/protobuf v1.2.0 github.com/gorilla/context v1.1.1 // indirect github.com/gorilla/handlers v1.3.0 github.com/gorilla/mux v1.6.1 + github.com/grpc-ecosystem/grpc-gateway v1.5.1 github.com/hpcloud/tail v1.0.0 // indirect github.com/jmoiron/sqlx v0.0.0-20170430194603-d9bd385d68c0 github.com/joho/godotenv v1.2.0 @@ -34,12 +35,9 @@ require ( github.com/sirupsen/logrus v1.0.5 github.com/stretchr/testify v1.2.1 golang.org/x/crypto v0.0.0-20170619204222-adbae1b6b6fb - golang.org/x/net v0.0.0-20170624000434-5f8847ae0d0e // indirect - golang.org/x/oauth2 v0.0.0-20180416194528-6881fee410a5 - golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect - golang.org/x/sys v0.0.0-20170922123423-429f518978ab // indirect - golang.org/x/text v0.3.0 // indirect - google.golang.org/appengine v0.0.0-20180405220334-0a24098c0ec6 // indirect + golang.org/x/net v0.0.0-20180826012351-8a410e7b638d + golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be + google.golang.org/grpc v1.16.0 gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect diff --git a/go.sum b/go.sum index 6c58ede6e1..18ea83cc55 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,12 @@ -cloud.google.com/go v0.0.0-20180417120045-d19004dbbee5 h1:rTagvm4LF13YHJQRHt6EAfWmKY7IGZJ/lRC2lK7e7xQ= -cloud.google.com/go v0.0.0-20180417120045-d19004dbbee5/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/airbrake/gobrake v3.5.0+incompatible h1:nm6Oxkzo1sKW3mpB9A+seVJJ289s4Dq/hXqktIByCew= github.com/airbrake/gobrake v3.5.0+incompatible/go.mod h1:wM4gu3Cn0W0K7GUuVWnlXZU11AGBXMILnrdOU8Kn00o= -github.com/benbjohnson/ego v0.3.0 h1:nFecrEww4ijgW17qYfjGSmSbxFXUCiPkRjaQd9/8UpA= -github.com/benbjohnson/ego v0.3.0/go.mod h1:6Qzj43pKX58WdlHDZKZS4Q/XXYwz6toIqXqNjzt4mNA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a h1:BtpsbiV638WQZwhA98cEZw2BsbnQJrbd0BI7tsy0W1c= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/certifi/gocertifi v0.0.0-20170727155124-3fd9e1adb12b h1:aKL6D1J3uESUIsImsFVtGA4/p9wlR4mNJ3lgRaxSXKs= github.com/certifi/gocertifi v0.0.0-20170727155124-3fd9e1adb12b/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/felixge/httpsnoop v1.0.0 h1:gh8fMGz0rlOv/1WmRZm7OgncIOTsAj21iNJot48omJQ= @@ -20,20 +19,31 @@ github.com/go-redis/redis v6.10.2+incompatible h1:SLbqrO/Ik1nhXA5/cbEs1P5MUBo1Qq github.com/go-redis/redis v6.10.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.3.0 h1:pgwjLi/dvffoP9aabwkT3AKpXQM93QARkjFhDDqC1UE= github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/golang/protobuf v0.0.0-20171021043952-1643683e1b54 h1:nRNJXiJvemchkOTn0V4U11TZkvacB94gTzbTZbSA7Rw= -github.com/golang/protobuf v0.0.0-20171021043952-1643683e1b54/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.3.0 h1:tsg9qP3mjt1h4Roxp+M1paRjrVBfPSOpBuVclh6YluI= github.com/gorilla/handlers v1.3.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.1 h1:KOwqsTYZdeuMacU7CxjMNYEKeBvLbxW+psodrbcEa3A= github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/grpc-ecosystem/grpc-gateway v1.5.1 h1:3scN4iuXkNOyP98jF55Lv8a9j1o/IwvnDIZ0LHJK1nk= +github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jmoiron/sqlx v0.0.0-20170430194603-d9bd385d68c0 h1:oZ1oQfWp4h9VX9Fmorc9DrmbHBwiw+mXphFDTVNp1vI= github.com/jmoiron/sqlx v0.0.0-20170430194603-d9bd385d68c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc= github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2 h1:hRGSmZu7j271trc9sneMrpOW7GN5ngLm8YUZIPzf394= github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-sqlite3 v1.6.0 h1:TDwTWbeII+88Qy55nWlof0DclgAtI4LqGujkYMzmQII= @@ -64,18 +74,24 @@ github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7 github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/crypto v0.0.0-20170619204222-adbae1b6b6fb h1:6QZjMZJzos5C5rW30xO+0C8f9gKkgeb1z/K4gyS8DFA= golang.org/x/crypto v0.0.0-20170619204222-adbae1b6b6fb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/net v0.0.0-20170624000434-5f8847ae0d0e h1:QgA/R9W9DdyznLiIOAoxKKvtcI4w7iGwJfQp6PoODgk= -golang.org/x/net v0.0.0-20170624000434-5f8847ae0d0e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20180416194528-6881fee410a5 h1:yammTX+17Kk8zo3wLi2C76s8XKCsyhSXwTVTFbqcKjM= -golang.org/x/oauth2 v0.0.0-20180416194528-6881fee410a5/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170922123423-429f518978ab h1:/SnMvMu4DHNz3T1J051qLvBpT2Wq57ymgrs7ouudGkY= -golang.org/x/sys v0.0.0-20170922123423-429f518978ab/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522 h1:Ve1ORMCxvRmSXBwJK+t3Oy+V2vRW2OetUQBq4rJIkZE= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v0.0.0-20180405220334-0a24098c0ec6 h1:w6GSgo6TmktxaEgSBTbacz3+I+FXUafdOp1Ko17Wx74= -google.golang.org/appengine v0.0.0-20180405220334-0a24098c0ec6/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v1.16.0 h1:dz5IJGuC2BB7qXR5AyHNwAUBhZscK2xVez7mznh72sY= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= @@ -90,3 +106,4 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/grpc/authn.pb.go b/grpc/authn.pb.go new file mode 100644 index 0000000000..f64d8cb6de --- /dev/null +++ b/grpc/authn.pb.go @@ -0,0 +1,7899 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: authn.proto + +package grpc + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/googleapis/google/api" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import strings "strings" +import reflect "reflect" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type SignupRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignupRequest) Reset() { *m = SignupRequest{} } +func (*SignupRequest) ProtoMessage() {} +func (*SignupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{0} +} +func (m *SignupRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignupRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SignupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignupRequest.Merge(dst, src) +} +func (m *SignupRequest) XXX_Size() int { + return m.Size() +} +func (m *SignupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SignupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SignupRequest proto.InternalMessageInfo + +func (m *SignupRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *SignupRequest) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +type SignupResponse struct { + IdToken string `protobuf:"bytes,1,opt,name=id_token,json=idToken,proto3" json:"id_token"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignupResponse) Reset() { *m = SignupResponse{} } +func (*SignupResponse) ProtoMessage() {} +func (*SignupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{1} +} +func (m *SignupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignupResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SignupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignupResponse.Merge(dst, src) +} +func (m *SignupResponse) XXX_Size() int { + return m.Size() +} +func (m *SignupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SignupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SignupResponse proto.InternalMessageInfo + +func (m *SignupResponse) GetIdToken() string { + if m != nil { + return m.IdToken + } + return "" +} + +type SignupResponseEnvelope struct { + Result *SignupResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignupResponseEnvelope) Reset() { *m = SignupResponseEnvelope{} } +func (*SignupResponseEnvelope) ProtoMessage() {} +func (*SignupResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{2} +} +func (m *SignupResponseEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignupResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignupResponseEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SignupResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignupResponseEnvelope.Merge(dst, src) +} +func (m *SignupResponseEnvelope) XXX_Size() int { + return m.Size() +} +func (m *SignupResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_SignupResponseEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_SignupResponseEnvelope proto.InternalMessageInfo + +func (m *SignupResponseEnvelope) GetResult() *SignupResponse { + if m != nil { + return m.Result + } + return nil +} + +type GetAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountRequest) Reset() { *m = GetAccountRequest{} } +func (*GetAccountRequest) ProtoMessage() {} +func (*GetAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{3} +} +func (m *GetAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountRequest.Merge(dst, src) +} +func (m *GetAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *GetAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountRequest proto.InternalMessageInfo + +func (m *GetAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type GetAccountResponse struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` + Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountResponse) Reset() { *m = GetAccountResponse{} } +func (*GetAccountResponse) ProtoMessage() {} +func (*GetAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{4} +} +func (m *GetAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountResponse.Merge(dst, src) +} +func (m *GetAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *GetAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountResponse proto.InternalMessageInfo + +func (m *GetAccountResponse) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *GetAccountResponse) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *GetAccountResponse) GetLocked() bool { + if m != nil { + return m.Locked + } + return false +} + +func (m *GetAccountResponse) GetDeleted() bool { + if m != nil { + return m.Deleted + } + return false +} + +type GetAccountResponseEnvelope struct { + Result *GetAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountResponseEnvelope) Reset() { *m = GetAccountResponseEnvelope{} } +func (*GetAccountResponseEnvelope) ProtoMessage() {} +func (*GetAccountResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{5} +} +func (m *GetAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountResponseEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountResponseEnvelope.Merge(dst, src) +} +func (m *GetAccountResponseEnvelope) XXX_Size() int { + return m.Size() +} +func (m *GetAccountResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountResponseEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountResponseEnvelope proto.InternalMessageInfo + +func (m *GetAccountResponseEnvelope) GetResult() *GetAccountResponse { + if m != nil { + return m.Result + } + return nil +} + +type UpdateAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateAccountRequest) Reset() { *m = UpdateAccountRequest{} } +func (*UpdateAccountRequest) ProtoMessage() {} +func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{6} +} +func (m *UpdateAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UpdateAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAccountRequest.Merge(dst, src) +} +func (m *UpdateAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *UpdateAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAccountRequest proto.InternalMessageInfo + +func (m *UpdateAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *UpdateAccountRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type IsUsernameAvailableRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } +func (*IsUsernameAvailableRequest) ProtoMessage() {} +func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{7} +} +func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IsUsernameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IsUsernameAvailableRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *IsUsernameAvailableRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsUsernameAvailableRequest.Merge(dst, src) +} +func (m *IsUsernameAvailableRequest) XXX_Size() int { + return m.Size() +} +func (m *IsUsernameAvailableRequest) XXX_DiscardUnknown() { + xxx_messageInfo_IsUsernameAvailableRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_IsUsernameAvailableRequest proto.InternalMessageInfo + +func (m *IsUsernameAvailableRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type IsUsernameAvailableResponseEnvelope struct { + Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } +func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} +func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{8} +} +func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IsUsernameAvailableResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *IsUsernameAvailableResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Merge(dst, src) +} +func (m *IsUsernameAvailableResponseEnvelope) XXX_Size() int { + return m.Size() +} +func (m *IsUsernameAvailableResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_IsUsernameAvailableResponseEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_IsUsernameAvailableResponseEnvelope proto.InternalMessageInfo + +func (m *IsUsernameAvailableResponseEnvelope) GetResult() bool { + if m != nil { + return m.Result + } + return false +} + +type LockAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LockAccountRequest) Reset() { *m = LockAccountRequest{} } +func (*LockAccountRequest) ProtoMessage() {} +func (*LockAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{9} +} +func (m *LockAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LockAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *LockAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LockAccountRequest.Merge(dst, src) +} +func (m *LockAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *LockAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LockAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LockAccountRequest proto.InternalMessageInfo + +func (m *LockAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type UnlockAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnlockAccountRequest) Reset() { *m = UnlockAccountRequest{} } +func (*UnlockAccountRequest) ProtoMessage() {} +func (*UnlockAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{10} +} +func (m *UnlockAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnlockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnlockAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnlockAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnlockAccountRequest.Merge(dst, src) +} +func (m *UnlockAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *UnlockAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UnlockAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UnlockAccountRequest proto.InternalMessageInfo + +func (m *UnlockAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type ArchiveAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ArchiveAccountRequest) Reset() { *m = ArchiveAccountRequest{} } +func (*ArchiveAccountRequest) ProtoMessage() {} +func (*ArchiveAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{11} +} +func (m *ArchiveAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ArchiveAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ArchiveAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ArchiveAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArchiveAccountRequest.Merge(dst, src) +} +func (m *ArchiveAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *ArchiveAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ArchiveAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ArchiveAccountRequest proto.InternalMessageInfo + +func (m *ArchiveAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type ImportAccountRequst struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountRequst) Reset() { *m = ImportAccountRequst{} } +func (*ImportAccountRequst) ProtoMessage() {} +func (*ImportAccountRequst) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{12} +} +func (m *ImportAccountRequst) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountRequst) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountRequst.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountRequst) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountRequst.Merge(dst, src) +} +func (m *ImportAccountRequst) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountRequst) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountRequst.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountRequst proto.InternalMessageInfo + +func (m *ImportAccountRequst) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *ImportAccountRequst) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +func (m *ImportAccountRequst) GetLocked() bool { + if m != nil { + return m.Locked + } + return false +} + +type ImportAccountResponse struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountResponse) Reset() { *m = ImportAccountResponse{} } +func (*ImportAccountResponse) ProtoMessage() {} +func (*ImportAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{13} +} +func (m *ImportAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountResponse.Merge(dst, src) +} +func (m *ImportAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountResponse proto.InternalMessageInfo + +func (m *ImportAccountResponse) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +type ImportAccountResponseEnvelope struct { + Result *ImportAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountResponseEnvelope) Reset() { *m = ImportAccountResponseEnvelope{} } +func (*ImportAccountResponseEnvelope) ProtoMessage() {} +func (*ImportAccountResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{14} +} +func (m *ImportAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountResponseEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountResponseEnvelope.Merge(dst, src) +} +func (m *ImportAccountResponseEnvelope) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountResponseEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountResponseEnvelope proto.InternalMessageInfo + +func (m *ImportAccountResponseEnvelope) GetResult() *ImportAccountResponse { + if m != nil { + return m.Result + } + return nil +} + +type LoginRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoginRequest) Reset() { *m = LoginRequest{} } +func (*LoginRequest) ProtoMessage() {} +func (*LoginRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{15} +} +func (m *LoginRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *LoginRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoginRequest.Merge(dst, src) +} +func (m *LoginRequest) XXX_Size() int { + return m.Size() +} +func (m *LoginRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LoginRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LoginRequest proto.InternalMessageInfo + +func (m *LoginRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *LoginRequest) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +type PasswordResetRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } +func (*PasswordResetRequest) ProtoMessage() {} +func (*PasswordResetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{16} +} +func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PasswordResetRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PasswordResetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordResetRequest.Merge(dst, src) +} +func (m *PasswordResetRequest) XXX_Size() int { + return m.Size() +} +func (m *PasswordResetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordResetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PasswordResetRequest proto.InternalMessageInfo + +func (m *PasswordResetRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type ChangePasswordRequest struct { + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + CurrentPassword string `protobuf:"bytes,3,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } +func (*ChangePasswordRequest) ProtoMessage() {} +func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{17} +} +func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ChangePasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangePasswordRequest.Merge(dst, src) +} +func (m *ChangePasswordRequest) XXX_Size() int { + return m.Size() +} +func (m *ChangePasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo + +func (m *ChangePasswordRequest) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +func (m *ChangePasswordRequest) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *ChangePasswordRequest) GetCurrentPassword() string { + if m != nil { + return m.CurrentPassword + } + return "" +} + +type ExpirePasswordRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExpirePasswordRequest) Reset() { *m = ExpirePasswordRequest{} } +func (*ExpirePasswordRequest) ProtoMessage() {} +func (*ExpirePasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{18} +} +func (m *ExpirePasswordRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpirePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExpirePasswordRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ExpirePasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpirePasswordRequest.Merge(dst, src) +} +func (m *ExpirePasswordRequest) XXX_Size() int { + return m.Size() +} +func (m *ExpirePasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ExpirePasswordRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpirePasswordRequest proto.InternalMessageInfo + +func (m *ExpirePasswordRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type BeginOAuthRequest struct { + ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` + RedirectURI string `protobuf:"bytes,2,opt,name=redirectURI,proto3" json:"redirectURI,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } +func (*BeginOAuthRequest) ProtoMessage() {} +func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{19} +} +func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BeginOAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BeginOAuthRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BeginOAuthRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BeginOAuthRequest.Merge(dst, src) +} +func (m *BeginOAuthRequest) XXX_Size() int { + return m.Size() +} +func (m *BeginOAuthRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BeginOAuthRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BeginOAuthRequest proto.InternalMessageInfo + +func (m *BeginOAuthRequest) GetProviderName() string { + if m != nil { + return m.ProviderName + } + return "" +} + +func (m *BeginOAuthRequest) GetRedirectURI() string { + if m != nil { + return m.RedirectURI + } + return "" +} + +type BeginOAuthResponse struct { + Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } +func (*BeginOAuthResponse) ProtoMessage() {} +func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{20} +} +func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BeginOAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BeginOAuthResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BeginOAuthResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BeginOAuthResponse.Merge(dst, src) +} +func (m *BeginOAuthResponse) XXX_Size() int { + return m.Size() +} +func (m *BeginOAuthResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BeginOAuthResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BeginOAuthResponse proto.InternalMessageInfo + +func (m *BeginOAuthResponse) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +type OAuthReturnRequest struct { + ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } +func (*OAuthReturnRequest) ProtoMessage() {} +func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{21} +} +func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OAuthReturnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OAuthReturnRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OAuthReturnRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OAuthReturnRequest.Merge(dst, src) +} +func (m *OAuthReturnRequest) XXX_Size() int { + return m.Size() +} +func (m *OAuthReturnRequest) XXX_DiscardUnknown() { + xxx_messageInfo_OAuthReturnRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_OAuthReturnRequest proto.InternalMessageInfo + +func (m *OAuthReturnRequest) GetProviderName() string { + if m != nil { + return m.ProviderName + } + return "" +} + +type OAuthReturnResponse struct { + Redirect string `protobuf:"bytes,1,opt,name=redirect,proto3" json:"redirect,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } +func (*OAuthReturnResponse) ProtoMessage() {} +func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{22} +} +func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OAuthReturnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OAuthReturnResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OAuthReturnResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OAuthReturnResponse.Merge(dst, src) +} +func (m *OAuthReturnResponse) XXX_Size() int { + return m.Size() +} +func (m *OAuthReturnResponse) XXX_DiscardUnknown() { + xxx_messageInfo_OAuthReturnResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_OAuthReturnResponse proto.InternalMessageInfo + +func (m *OAuthReturnResponse) GetRedirect() string { + if m != nil { + return m.Redirect + } + return "" +} + +type Configuration struct { + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + ResponseTypesSupported []string `protobuf:"bytes,2,rep,name=response_types_supported,json=responseTypesSupported" json:"response_types_supported,omitempty"` + SubjectTypesSupported []string `protobuf:"bytes,3,rep,name=subject_types_supported,json=subjectTypesSupported" json:"subject_types_supported,omitempty"` + IdTokenSigningAlgValuesSupported []string `protobuf:"bytes,4,rep,name=id_token_signing_alg_values_supported,json=idTokenSigningAlgValuesSupported" json:"id_token_signing_alg_values_supported,omitempty"` + ClaimsSupported []string `protobuf:"bytes,5,rep,name=claims_supported,json=claimsSupported" json:"claims_supported,omitempty"` + JwksUri string `protobuf:"bytes,6,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Configuration) Reset() { *m = Configuration{} } +func (*Configuration) ProtoMessage() {} +func (*Configuration) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{23} +} +func (m *Configuration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Configuration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Configuration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Configuration.Merge(dst, src) +} +func (m *Configuration) XXX_Size() int { + return m.Size() +} +func (m *Configuration) XXX_DiscardUnknown() { + xxx_messageInfo_Configuration.DiscardUnknown(m) +} + +var xxx_messageInfo_Configuration proto.InternalMessageInfo + +func (m *Configuration) GetIssuer() string { + if m != nil { + return m.Issuer + } + return "" +} + +func (m *Configuration) GetResponseTypesSupported() []string { + if m != nil { + return m.ResponseTypesSupported + } + return nil +} + +func (m *Configuration) GetSubjectTypesSupported() []string { + if m != nil { + return m.SubjectTypesSupported + } + return nil +} + +func (m *Configuration) GetIdTokenSigningAlgValuesSupported() []string { + if m != nil { + return m.IdTokenSigningAlgValuesSupported + } + return nil +} + +func (m *Configuration) GetClaimsSupported() []string { + if m != nil { + return m.ClaimsSupported + } + return nil +} + +func (m *Configuration) GetJwksUri() string { + if m != nil { + return m.JwksUri + } + return "" +} + +type ServiceStatsResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceStatsResponse) Reset() { *m = ServiceStatsResponse{} } +func (*ServiceStatsResponse) ProtoMessage() {} +func (*ServiceStatsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{24} +} +func (m *ServiceStatsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceStatsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ServiceStatsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceStatsResponse.Merge(dst, src) +} +func (m *ServiceStatsResponse) XXX_Size() int { + return m.Size() +} +func (m *ServiceStatsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceStatsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceStatsResponse proto.InternalMessageInfo + +type HealthCheckResponse struct { + Http bool `protobuf:"varint,1,opt,name=http,proto3" json:"http,omitempty"` + Db bool `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"` + Redis bool `protobuf:"varint,3,opt,name=redis,proto3" json:"redis,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } +func (*HealthCheckResponse) ProtoMessage() {} +func (*HealthCheckResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{25} +} +func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckResponse.Merge(dst, src) +} +func (m *HealthCheckResponse) XXX_Size() int { + return m.Size() +} +func (m *HealthCheckResponse) XXX_DiscardUnknown() { + xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo + +func (m *HealthCheckResponse) GetHttp() bool { + if m != nil { + return m.Http + } + return false +} + +func (m *HealthCheckResponse) GetDb() bool { + if m != nil { + return m.Db + } + return false +} + +func (m *HealthCheckResponse) GetRedis() bool { + if m != nil { + return m.Redis + } + return false +} + +type Key struct { + Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` + Alg []string `protobuf:"bytes,2,rep,name=alg" json:"alg,omitempty"` + Kty string `protobuf:"bytes,3,opt,name=kty,proto3" json:"kty,omitempty"` + Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` + E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` + N string `protobuf:"bytes,6,opt,name=n,proto3" json:"n,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Key) Reset() { *m = Key{} } +func (*Key) ProtoMessage() {} +func (*Key) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{26} +} +func (m *Key) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Key.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Key) XXX_Merge(src proto.Message) { + xxx_messageInfo_Key.Merge(dst, src) +} +func (m *Key) XXX_Size() int { + return m.Size() +} +func (m *Key) XXX_DiscardUnknown() { + xxx_messageInfo_Key.DiscardUnknown(m) +} + +var xxx_messageInfo_Key proto.InternalMessageInfo + +func (m *Key) GetUse() string { + if m != nil { + return m.Use + } + return "" +} + +func (m *Key) GetAlg() []string { + if m != nil { + return m.Alg + } + return nil +} + +func (m *Key) GetKty() string { + if m != nil { + return m.Kty + } + return "" +} + +func (m *Key) GetKid() string { + if m != nil { + return m.Kid + } + return "" +} + +func (m *Key) GetE() string { + if m != nil { + return m.E + } + return "" +} + +func (m *Key) GetN() string { + if m != nil { + return m.N + } + return "" +} + +type JWKSResponse struct { + Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } +func (*JWKSResponse) ProtoMessage() {} +func (*JWKSResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_975e18bf4e534da8, []int{27} +} +func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *JWKSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_JWKSResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *JWKSResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JWKSResponse.Merge(dst, src) +} +func (m *JWKSResponse) XXX_Size() int { + return m.Size() +} +func (m *JWKSResponse) XXX_DiscardUnknown() { + xxx_messageInfo_JWKSResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_JWKSResponse proto.InternalMessageInfo + +func (m *JWKSResponse) GetKeys() []*Key { + if m != nil { + return m.Keys + } + return nil +} + +func init() { + proto.RegisterType((*SignupRequest)(nil), "grpc.SignupRequest") + proto.RegisterType((*SignupResponse)(nil), "grpc.SignupResponse") + proto.RegisterType((*SignupResponseEnvelope)(nil), "grpc.SignupResponseEnvelope") + proto.RegisterType((*GetAccountRequest)(nil), "grpc.GetAccountRequest") + proto.RegisterType((*GetAccountResponse)(nil), "grpc.GetAccountResponse") + proto.RegisterType((*GetAccountResponseEnvelope)(nil), "grpc.GetAccountResponseEnvelope") + proto.RegisterType((*UpdateAccountRequest)(nil), "grpc.UpdateAccountRequest") + proto.RegisterType((*IsUsernameAvailableRequest)(nil), "grpc.IsUsernameAvailableRequest") + proto.RegisterType((*IsUsernameAvailableResponseEnvelope)(nil), "grpc.IsUsernameAvailableResponseEnvelope") + proto.RegisterType((*LockAccountRequest)(nil), "grpc.LockAccountRequest") + proto.RegisterType((*UnlockAccountRequest)(nil), "grpc.UnlockAccountRequest") + proto.RegisterType((*ArchiveAccountRequest)(nil), "grpc.ArchiveAccountRequest") + proto.RegisterType((*ImportAccountRequst)(nil), "grpc.ImportAccountRequst") + proto.RegisterType((*ImportAccountResponse)(nil), "grpc.ImportAccountResponse") + proto.RegisterType((*ImportAccountResponseEnvelope)(nil), "grpc.ImportAccountResponseEnvelope") + proto.RegisterType((*LoginRequest)(nil), "grpc.LoginRequest") + proto.RegisterType((*PasswordResetRequest)(nil), "grpc.PasswordResetRequest") + proto.RegisterType((*ChangePasswordRequest)(nil), "grpc.ChangePasswordRequest") + proto.RegisterType((*ExpirePasswordRequest)(nil), "grpc.ExpirePasswordRequest") + proto.RegisterType((*BeginOAuthRequest)(nil), "grpc.BeginOAuthRequest") + proto.RegisterType((*BeginOAuthResponse)(nil), "grpc.BeginOAuthResponse") + proto.RegisterType((*OAuthReturnRequest)(nil), "grpc.OAuthReturnRequest") + proto.RegisterType((*OAuthReturnResponse)(nil), "grpc.OAuthReturnResponse") + proto.RegisterType((*Configuration)(nil), "grpc.Configuration") + proto.RegisterType((*ServiceStatsResponse)(nil), "grpc.ServiceStatsResponse") + proto.RegisterType((*HealthCheckResponse)(nil), "grpc.HealthCheckResponse") + proto.RegisterType((*Key)(nil), "grpc.Key") + proto.RegisterType((*JWKSResponse)(nil), "grpc.JWKSResponse") +} +func (this *SignupRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SignupRequest) + if !ok { + that2, ok := that.(SignupRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + if this.Password != that1.Password { + return false + } + return true +} +func (this *SignupResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SignupResponse) + if !ok { + that2, ok := that.(SignupResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.IdToken != that1.IdToken { + return false + } + return true +} +func (this *SignupResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SignupResponseEnvelope) + if !ok { + that2, ok := that.(SignupResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Result.Equal(that1.Result) { + return false + } + return true +} +func (this *GetAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountRequest) + if !ok { + that2, ok := that.(GetAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *GetAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountResponse) + if !ok { + that2, ok := that.(GetAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Username != that1.Username { + return false + } + if this.Locked != that1.Locked { + return false + } + if this.Deleted != that1.Deleted { + return false + } + return true +} +func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountResponseEnvelope) + if !ok { + that2, ok := that.(GetAccountResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Result.Equal(that1.Result) { + return false + } + return true +} +func (this *UpdateAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UpdateAccountRequest) + if !ok { + that2, ok := that.(UpdateAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Username != that1.Username { + return false + } + return true +} +func (this *IsUsernameAvailableRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IsUsernameAvailableRequest) + if !ok { + that2, ok := that.(IsUsernameAvailableRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + return true +} +func (this *IsUsernameAvailableResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IsUsernameAvailableResponseEnvelope) + if !ok { + that2, ok := that.(IsUsernameAvailableResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Result != that1.Result { + return false + } + return true +} +func (this *LockAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LockAccountRequest) + if !ok { + that2, ok := that.(LockAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *UnlockAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnlockAccountRequest) + if !ok { + that2, ok := that.(UnlockAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ArchiveAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ArchiveAccountRequest) + if !ok { + that2, ok := that.(ArchiveAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ImportAccountRequst) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountRequst) + if !ok { + that2, ok := that.(ImportAccountRequst) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + if this.Password != that1.Password { + return false + } + if this.Locked != that1.Locked { + return false + } + return true +} +func (this *ImportAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountResponse) + if !ok { + that2, ok := that.(ImportAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ImportAccountResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountResponseEnvelope) + if !ok { + that2, ok := that.(ImportAccountResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Result.Equal(that1.Result) { + return false + } + return true +} +func (this *LoginRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LoginRequest) + if !ok { + that2, ok := that.(LoginRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + if this.Password != that1.Password { + return false + } + return true +} +func (this *PasswordResetRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*PasswordResetRequest) + if !ok { + that2, ok := that.(PasswordResetRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + return true +} +func (this *ChangePasswordRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ChangePasswordRequest) + if !ok { + that2, ok := that.(ChangePasswordRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Password != that1.Password { + return false + } + if this.Token != that1.Token { + return false + } + if this.CurrentPassword != that1.CurrentPassword { + return false + } + return true +} +func (this *ExpirePasswordRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ExpirePasswordRequest) + if !ok { + that2, ok := that.(ExpirePasswordRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *BeginOAuthRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BeginOAuthRequest) + if !ok { + that2, ok := that.(BeginOAuthRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ProviderName != that1.ProviderName { + return false + } + if this.RedirectURI != that1.RedirectURI { + return false + } + return true +} +func (this *BeginOAuthResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BeginOAuthResponse) + if !ok { + that2, ok := that.(BeginOAuthResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Provider != that1.Provider { + return false + } + return true +} +func (this *OAuthReturnRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OAuthReturnRequest) + if !ok { + that2, ok := that.(OAuthReturnRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ProviderName != that1.ProviderName { + return false + } + return true +} +func (this *OAuthReturnResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OAuthReturnResponse) + if !ok { + that2, ok := that.(OAuthReturnResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Redirect != that1.Redirect { + return false + } + return true +} +func (this *Configuration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Configuration) + if !ok { + that2, ok := that.(Configuration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Issuer != that1.Issuer { + return false + } + if len(this.ResponseTypesSupported) != len(that1.ResponseTypesSupported) { + return false + } + for i := range this.ResponseTypesSupported { + if this.ResponseTypesSupported[i] != that1.ResponseTypesSupported[i] { + return false + } + } + if len(this.SubjectTypesSupported) != len(that1.SubjectTypesSupported) { + return false + } + for i := range this.SubjectTypesSupported { + if this.SubjectTypesSupported[i] != that1.SubjectTypesSupported[i] { + return false + } + } + if len(this.IdTokenSigningAlgValuesSupported) != len(that1.IdTokenSigningAlgValuesSupported) { + return false + } + for i := range this.IdTokenSigningAlgValuesSupported { + if this.IdTokenSigningAlgValuesSupported[i] != that1.IdTokenSigningAlgValuesSupported[i] { + return false + } + } + if len(this.ClaimsSupported) != len(that1.ClaimsSupported) { + return false + } + for i := range this.ClaimsSupported { + if this.ClaimsSupported[i] != that1.ClaimsSupported[i] { + return false + } + } + if this.JwksUri != that1.JwksUri { + return false + } + return true +} +func (this *ServiceStatsResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ServiceStatsResponse) + if !ok { + that2, ok := that.(ServiceStatsResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *HealthCheckResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*HealthCheckResponse) + if !ok { + that2, ok := that.(HealthCheckResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Http != that1.Http { + return false + } + if this.Db != that1.Db { + return false + } + if this.Redis != that1.Redis { + return false + } + return true +} +func (this *Key) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Key) + if !ok { + that2, ok := that.(Key) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Use != that1.Use { + return false + } + if len(this.Alg) != len(that1.Alg) { + return false + } + for i := range this.Alg { + if this.Alg[i] != that1.Alg[i] { + return false + } + } + if this.Kty != that1.Kty { + return false + } + if this.Kid != that1.Kid { + return false + } + if this.E != that1.E { + return false + } + if this.N != that1.N { + return false + } + return true +} +func (this *JWKSResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*JWKSResponse) + if !ok { + that2, ok := that.(JWKSResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Keys) != len(that1.Keys) { + return false + } + for i := range this.Keys { + if !this.Keys[i].Equal(that1.Keys[i]) { + return false + } + } + return true +} +func (this *SignupRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&grpc.SignupRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SignupResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.SignupResponse{") + s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SignupResponseEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.SignupResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.GetAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&grpc.GetAccountResponse{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") + s = append(s, "Deleted: "+fmt.Sprintf("%#v", this.Deleted)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetAccountResponseEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.GetAccountResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UpdateAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&grpc.UpdateAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *IsUsernameAvailableRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.IsUsernameAvailableRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *IsUsernameAvailableResponseEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.IsUsernameAvailableResponseEnvelope{") + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LockAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.LockAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnlockAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.UnlockAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ArchiveAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ArchiveAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountRequst) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&grpc.ImportAccountRequst{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ImportAccountResponse{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountResponseEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ImportAccountResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LoginRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&grpc.LoginRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *PasswordResetRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.PasswordResetRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ChangePasswordRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&grpc.ChangePasswordRequest{") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "Token: "+fmt.Sprintf("%#v", this.Token)+",\n") + s = append(s, "CurrentPassword: "+fmt.Sprintf("%#v", this.CurrentPassword)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ExpirePasswordRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ExpirePasswordRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BeginOAuthRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&grpc.BeginOAuthRequest{") + s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") + s = append(s, "RedirectURI: "+fmt.Sprintf("%#v", this.RedirectURI)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BeginOAuthResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.BeginOAuthResponse{") + s = append(s, "Provider: "+fmt.Sprintf("%#v", this.Provider)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OAuthReturnRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.OAuthReturnRequest{") + s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OAuthReturnResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.OAuthReturnResponse{") + s = append(s, "Redirect: "+fmt.Sprintf("%#v", this.Redirect)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Configuration) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&grpc.Configuration{") + s = append(s, "Issuer: "+fmt.Sprintf("%#v", this.Issuer)+",\n") + s = append(s, "ResponseTypesSupported: "+fmt.Sprintf("%#v", this.ResponseTypesSupported)+",\n") + s = append(s, "SubjectTypesSupported: "+fmt.Sprintf("%#v", this.SubjectTypesSupported)+",\n") + s = append(s, "IdTokenSigningAlgValuesSupported: "+fmt.Sprintf("%#v", this.IdTokenSigningAlgValuesSupported)+",\n") + s = append(s, "ClaimsSupported: "+fmt.Sprintf("%#v", this.ClaimsSupported)+",\n") + s = append(s, "JwksUri: "+fmt.Sprintf("%#v", this.JwksUri)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceStatsResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.ServiceStatsResponse{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *HealthCheckResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&grpc.HealthCheckResponse{") + s = append(s, "Http: "+fmt.Sprintf("%#v", this.Http)+",\n") + s = append(s, "Db: "+fmt.Sprintf("%#v", this.Db)+",\n") + s = append(s, "Redis: "+fmt.Sprintf("%#v", this.Redis)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Key) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&grpc.Key{") + s = append(s, "Use: "+fmt.Sprintf("%#v", this.Use)+",\n") + s = append(s, "Alg: "+fmt.Sprintf("%#v", this.Alg)+",\n") + s = append(s, "Kty: "+fmt.Sprintf("%#v", this.Kty)+",\n") + s = append(s, "Kid: "+fmt.Sprintf("%#v", this.Kid)+",\n") + s = append(s, "E: "+fmt.Sprintf("%#v", this.E)+",\n") + s = append(s, "N: "+fmt.Sprintf("%#v", this.N)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *JWKSResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.JWKSResponse{") + if this.Keys != nil { + s = append(s, "Keys: "+fmt.Sprintf("%#v", this.Keys)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringAuthn(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// AuthNClient is the client API for AuthN service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AuthNClient interface { + Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) + LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) + Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) + RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) + Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) + RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) + ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) + ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) + BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) + OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) + ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) + JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) + ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) + ServerStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) + HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) +} + +type authNClient struct { + cc *grpc.ClientConn +} + +func NewAuthNClient(cc *grpc.ClientConn) AuthNClient { + return &authNClient{cc} +} + +func (c *authNClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { + out := new(SignupResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.AuthN/Signup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) { + out := new(GetAccountResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.AuthN/GetAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AuthN/UpdateAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) { + out := new(IsUsernameAvailableResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.AuthN/IsUsernameAvailable", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AuthN/LockAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AuthN/UnlockAcount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AuthN/ArchiveAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) { + out := new(ImportAccountResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.AuthN/ImportAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.AuthN/Login", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.AuthN/RefreshSession", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AuthN/Logout", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AuthN/RequestPasswordReset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.AuthN/ChangePassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AuthN/ExpirePassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) { + out := new(BeginOAuthResponse) + err := c.cc.Invoke(ctx, "/grpc.AuthN/BeginOAuth", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) { + out := new(OAuthReturnResponse) + err := c.cc.Invoke(ctx, "/grpc.AuthN/OAuthReturn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) { + out := new(Configuration) + err := c.cc.Invoke(ctx, "/grpc.AuthN/ServiceConfiguration", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) { + out := new(JWKSResponse) + err := c.cc.Invoke(ctx, "/grpc.AuthN/JWKS", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) { + out := new(ServiceStatsResponse) + err := c.cc.Invoke(ctx, "/grpc.AuthN/ServiceStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) ServerStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AuthN/ServerStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authNClient) HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { + out := new(HealthCheckResponse) + err := c.cc.Invoke(ctx, "/grpc.AuthN/HealthCheck", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthNServer is the server API for AuthN service. +type AuthNServer interface { + Signup(context.Context, *SignupRequest) (*SignupResponseEnvelope, error) + GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponseEnvelope, error) + UpdateAccount(context.Context, *UpdateAccountRequest) (*types.Empty, error) + IsUsernameAvailable(context.Context, *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) + LockAccount(context.Context, *LockAccountRequest) (*types.Empty, error) + UnlockAcount(context.Context, *UnlockAccountRequest) (*types.Empty, error) + ArchiveAccount(context.Context, *ArchiveAccountRequest) (*types.Empty, error) + ImportAccount(context.Context, *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) + Login(context.Context, *LoginRequest) (*SignupResponse, error) + RefreshSession(context.Context, *types.Empty) (*SignupResponse, error) + Logout(context.Context, *types.Empty) (*types.Empty, error) + RequestPasswordReset(context.Context, *PasswordResetRequest) (*types.Empty, error) + ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponse, error) + ExpirePassword(context.Context, *ExpirePasswordRequest) (*types.Empty, error) + BeginOAuth(context.Context, *BeginOAuthRequest) (*BeginOAuthResponse, error) + OAuthReturn(context.Context, *OAuthReturnRequest) (*OAuthReturnResponse, error) + ServiceConfiguration(context.Context, *types.Empty) (*Configuration, error) + JWKS(context.Context, *types.Empty) (*JWKSResponse, error) + ServiceStats(context.Context, *types.Empty) (*ServiceStatsResponse, error) + ServerStats(context.Context, *types.Empty) (*types.Empty, error) + HealthCheck(context.Context, *types.Empty) (*HealthCheckResponse, error) +} + +func RegisterAuthNServer(s *grpc.Server, srv AuthNServer) { + s.RegisterService(&_AuthN_serviceDesc, srv) +} + +func _AuthN_Signup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).Signup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/Signup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).Signup(ctx, req.(*SignupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/GetAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).GetAccount(ctx, req.(*GetAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).UpdateAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/UpdateAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).UpdateAccount(ctx, req.(*UpdateAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_IsUsernameAvailable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsUsernameAvailableRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).IsUsernameAvailable(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/IsUsernameAvailable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).IsUsernameAvailable(ctx, req.(*IsUsernameAvailableRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_LockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LockAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).LockAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/LockAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).LockAccount(ctx, req.(*LockAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_UnlockAcount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnlockAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).UnlockAcount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/UnlockAcount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).UnlockAcount(ctx, req.(*UnlockAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_ArchiveAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).ArchiveAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/ArchiveAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).ArchiveAccount(ctx, req.(*ArchiveAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_ImportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportAccountRequst) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).ImportAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/ImportAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).ImportAccount(ctx, req.(*ImportAccountRequst)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).Login(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/Login", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).Login(ctx, req.(*LoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_RefreshSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).RefreshSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/RefreshSession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).RefreshSession(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).Logout(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/Logout", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).Logout(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_RequestPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PasswordResetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).RequestPasswordReset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/RequestPasswordReset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).RequestPasswordReset(ctx, req.(*PasswordResetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangePasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).ChangePassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/ChangePassword", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_ExpirePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExpirePasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).ExpirePassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/ExpirePassword", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).ExpirePassword(ctx, req.(*ExpirePasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_BeginOAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BeginOAuthRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).BeginOAuth(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/BeginOAuth", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).BeginOAuth(ctx, req.(*BeginOAuthRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_OAuthReturn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OAuthReturnRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).OAuthReturn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/OAuthReturn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).OAuthReturn(ctx, req.(*OAuthReturnRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_ServiceConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).ServiceConfiguration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/ServiceConfiguration", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).ServiceConfiguration(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_JWKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).JWKS(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/JWKS", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).JWKS(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_ServiceStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).ServiceStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/ServiceStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).ServiceStats(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_ServerStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).ServerStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/ServerStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).ServerStats(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthN_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNServer).HealthCheck(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AuthN/HealthCheck", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNServer).HealthCheck(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _AuthN_serviceDesc = grpc.ServiceDesc{ + ServiceName: "grpc.AuthN", + HandlerType: (*AuthNServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Signup", + Handler: _AuthN_Signup_Handler, + }, + { + MethodName: "GetAccount", + Handler: _AuthN_GetAccount_Handler, + }, + { + MethodName: "UpdateAccount", + Handler: _AuthN_UpdateAccount_Handler, + }, + { + MethodName: "IsUsernameAvailable", + Handler: _AuthN_IsUsernameAvailable_Handler, + }, + { + MethodName: "LockAccount", + Handler: _AuthN_LockAccount_Handler, + }, + { + MethodName: "UnlockAcount", + Handler: _AuthN_UnlockAcount_Handler, + }, + { + MethodName: "ArchiveAccount", + Handler: _AuthN_ArchiveAccount_Handler, + }, + { + MethodName: "ImportAccount", + Handler: _AuthN_ImportAccount_Handler, + }, + { + MethodName: "Login", + Handler: _AuthN_Login_Handler, + }, + { + MethodName: "RefreshSession", + Handler: _AuthN_RefreshSession_Handler, + }, + { + MethodName: "Logout", + Handler: _AuthN_Logout_Handler, + }, + { + MethodName: "RequestPasswordReset", + Handler: _AuthN_RequestPasswordReset_Handler, + }, + { + MethodName: "ChangePassword", + Handler: _AuthN_ChangePassword_Handler, + }, + { + MethodName: "ExpirePassword", + Handler: _AuthN_ExpirePassword_Handler, + }, + { + MethodName: "BeginOAuth", + Handler: _AuthN_BeginOAuth_Handler, + }, + { + MethodName: "OAuthReturn", + Handler: _AuthN_OAuthReturn_Handler, + }, + { + MethodName: "ServiceConfiguration", + Handler: _AuthN_ServiceConfiguration_Handler, + }, + { + MethodName: "JWKS", + Handler: _AuthN_JWKS_Handler, + }, + { + MethodName: "ServiceStats", + Handler: _AuthN_ServiceStats_Handler, + }, + { + MethodName: "ServerStats", + Handler: _AuthN_ServerStats_Handler, + }, + { + MethodName: "HealthCheck", + Handler: _AuthN_HealthCheck_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn.proto", +} + +func (m *SignupRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SignupRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + return i, nil +} + +func (m *SignupResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SignupResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.IdToken) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) + i += copy(dAtA[i:], m.IdToken) + } + return i, nil +} + +func (m *SignupResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SignupResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n1, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *GetAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(m.Id)) + } + if len(m.Username) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if m.Locked { + dAtA[i] = 0x18 + i++ + if m.Locked { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Deleted { + dAtA[i] = 0x20 + i++ + if m.Deleted { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *GetAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n2, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func (m *UpdateAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.Username) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *IsUsernameAvailableRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IsUsernameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *IsUsernameAvailableResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IsUsernameAvailableResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result { + dAtA[i] = 0x8 + i++ + if m.Result { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *LockAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LockAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *UnlockAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnlockAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *ArchiveAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ArchiveAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *ImportAccountRequst) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountRequst) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + if m.Locked { + dAtA[i] = 0x18 + i++ + if m.Locked { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ImportAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(m.Id)) + } + return i, nil +} + +func (m *ImportAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n3, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} + +func (m *LoginRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LoginRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + return i, nil +} + +func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PasswordResetRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Password) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + if len(m.Token) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) + i += copy(dAtA[i:], m.Token) + } + if len(m.CurrentPassword) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.CurrentPassword))) + i += copy(dAtA[i:], m.CurrentPassword) + } + return i, nil +} + +func (m *ExpirePasswordRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpirePasswordRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *BeginOAuthRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BeginOAuthRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProviderName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) + i += copy(dAtA[i:], m.ProviderName) + } + if len(m.RedirectURI) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.RedirectURI))) + i += copy(dAtA[i:], m.RedirectURI) + } + return i, nil +} + +func (m *BeginOAuthResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BeginOAuthResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Provider))) + i += copy(dAtA[i:], m.Provider) + } + return i, nil +} + +func (m *OAuthReturnRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OAuthReturnRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProviderName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) + i += copy(dAtA[i:], m.ProviderName) + } + return i, nil +} + +func (m *OAuthReturnResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OAuthReturnResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Redirect) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Redirect))) + i += copy(dAtA[i:], m.Redirect) + } + return i, nil +} + +func (m *Configuration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Configuration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Issuer) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Issuer))) + i += copy(dAtA[i:], m.Issuer) + } + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.IdTokenSigningAlgValuesSupported) > 0 { + for _, s := range m.IdTokenSigningAlgValuesSupported { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.ClaimsSupported) > 0 { + for _, s := range m.ClaimsSupported { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.JwksUri) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.JwksUri))) + i += copy(dAtA[i:], m.JwksUri) + } + return i, nil +} + +func (m *ServiceStatsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceStatsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Http { + dAtA[i] = 0x8 + i++ + if m.Http { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Db { + dAtA[i] = 0x10 + i++ + if m.Db { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Redis { + dAtA[i] = 0x18 + i++ + if m.Redis { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *Key) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Key) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Use) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Use))) + i += copy(dAtA[i:], m.Use) + } + if len(m.Alg) > 0 { + for _, s := range m.Alg { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.Kty) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kty))) + i += copy(dAtA[i:], m.Kty) + } + if len(m.Kid) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kid))) + i += copy(dAtA[i:], m.Kid) + } + if len(m.E) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.E))) + i += copy(dAtA[i:], m.E) + } + if len(m.N) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.N))) + i += copy(dAtA[i:], m.N) + } + return i, nil +} + +func (m *JWKSResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *JWKSResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Keys) > 0 { + for _, msg := range m.Keys { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func encodeVarintAuthn(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *SignupRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *SignupResponse) Size() (n int) { + var l int + _ = l + l = len(m.IdToken) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *SignupResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *GetAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *GetAccountResponse) Size() (n int) { + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuthn(uint64(m.Id)) + } + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + if m.Locked { + n += 2 + } + if m.Deleted { + n += 2 + } + return n +} + +func (m *GetAccountResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *UpdateAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *IsUsernameAvailableRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *IsUsernameAvailableResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result { + n += 2 + } + return n +} + +func (m *LockAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *UnlockAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *ArchiveAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *ImportAccountRequst) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + if m.Locked { + n += 2 + } + return n +} + +func (m *ImportAccountResponse) Size() (n int) { + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuthn(uint64(m.Id)) + } + return n +} + +func (m *ImportAccountResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *LoginRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *PasswordResetRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *ChangePasswordRequest) Size() (n int) { + var l int + _ = l + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.Token) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.CurrentPassword) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *ExpirePasswordRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *BeginOAuthRequest) Size() (n int) { + var l int + _ = l + l = len(m.ProviderName) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.RedirectURI) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *BeginOAuthResponse) Size() (n int) { + var l int + _ = l + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *OAuthReturnRequest) Size() (n int) { + var l int + _ = l + l = len(m.ProviderName) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *OAuthReturnResponse) Size() (n int) { + var l int + _ = l + l = len(m.Redirect) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *Configuration) Size() (n int) { + var l int + _ = l + l = len(m.Issuer) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } + } + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } + } + if len(m.IdTokenSigningAlgValuesSupported) > 0 { + for _, s := range m.IdTokenSigningAlgValuesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } + } + if len(m.ClaimsSupported) > 0 { + for _, s := range m.ClaimsSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } + } + l = len(m.JwksUri) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *ServiceStatsResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *HealthCheckResponse) Size() (n int) { + var l int + _ = l + if m.Http { + n += 2 + } + if m.Db { + n += 2 + } + if m.Redis { + n += 2 + } + return n +} + +func (m *Key) Size() (n int) { + var l int + _ = l + l = len(m.Use) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + if len(m.Alg) > 0 { + for _, s := range m.Alg { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } + } + l = len(m.Kty) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.Kid) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.E) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.N) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *JWKSResponse) Size() (n int) { + var l int + _ = l + if len(m.Keys) > 0 { + for _, e := range m.Keys { + l = e.Size() + n += 1 + l + sovAuthn(uint64(l)) + } + } + return n +} + +func sovAuthn(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAuthn(x uint64) (n int) { + return sovAuthn(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *SignupRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SignupRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `}`, + }, "") + return s +} +func (this *SignupResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SignupResponse{`, + `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, + `}`, + }, "") + return s +} +func (this *SignupResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SignupResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "SignupResponse", "SignupResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *GetAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *GetAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountResponse{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, + `Deleted:` + fmt.Sprintf("%v", this.Deleted) + `,`, + `}`, + }, "") + return s +} +func (this *GetAccountResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "GetAccountResponse", "GetAccountResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *IsUsernameAvailableRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IsUsernameAvailableRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *IsUsernameAvailableResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IsUsernameAvailableResponseEnvelope{`, + `Result:` + fmt.Sprintf("%v", this.Result) + `,`, + `}`, + }, "") + return s +} +func (this *LockAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LockAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *UnlockAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnlockAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ArchiveAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ArchiveAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountRequst) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountRequst{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountResponse{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "ImportAccountResponse", "ImportAccountResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *LoginRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LoginRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `}`, + }, "") + return s +} +func (this *PasswordResetRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PasswordResetRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *ChangePasswordRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ChangePasswordRequest{`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Token:` + fmt.Sprintf("%v", this.Token) + `,`, + `CurrentPassword:` + fmt.Sprintf("%v", this.CurrentPassword) + `,`, + `}`, + }, "") + return s +} +func (this *ExpirePasswordRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExpirePasswordRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *BeginOAuthRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BeginOAuthRequest{`, + `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, + `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, + `}`, + }, "") + return s +} +func (this *BeginOAuthResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BeginOAuthResponse{`, + `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, + `}`, + }, "") + return s +} +func (this *OAuthReturnRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OAuthReturnRequest{`, + `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, + `}`, + }, "") + return s +} +func (this *OAuthReturnResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OAuthReturnResponse{`, + `Redirect:` + fmt.Sprintf("%v", this.Redirect) + `,`, + `}`, + }, "") + return s +} +func (this *Configuration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Configuration{`, + `Issuer:` + fmt.Sprintf("%v", this.Issuer) + `,`, + `ResponseTypesSupported:` + fmt.Sprintf("%v", this.ResponseTypesSupported) + `,`, + `SubjectTypesSupported:` + fmt.Sprintf("%v", this.SubjectTypesSupported) + `,`, + `IdTokenSigningAlgValuesSupported:` + fmt.Sprintf("%v", this.IdTokenSigningAlgValuesSupported) + `,`, + `ClaimsSupported:` + fmt.Sprintf("%v", this.ClaimsSupported) + `,`, + `JwksUri:` + fmt.Sprintf("%v", this.JwksUri) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceStatsResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceStatsResponse{`, + `}`, + }, "") + return s +} +func (this *HealthCheckResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HealthCheckResponse{`, + `Http:` + fmt.Sprintf("%v", this.Http) + `,`, + `Db:` + fmt.Sprintf("%v", this.Db) + `,`, + `Redis:` + fmt.Sprintf("%v", this.Redis) + `,`, + `}`, + }, "") + return s +} +func (this *Key) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Key{`, + `Use:` + fmt.Sprintf("%v", this.Use) + `,`, + `Alg:` + fmt.Sprintf("%v", this.Alg) + `,`, + `Kty:` + fmt.Sprintf("%v", this.Kty) + `,`, + `Kid:` + fmt.Sprintf("%v", this.Kid) + `,`, + `E:` + fmt.Sprintf("%v", this.E) + `,`, + `N:` + fmt.Sprintf("%v", this.N) + `,`, + `}`, + }, "") + return s +} +func (this *JWKSResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&JWKSResponse{`, + `Keys:` + strings.Replace(fmt.Sprintf("%v", this.Keys), "Key", "Key", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringAuthn(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *SignupRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignupRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignupRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignupResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignupResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignupResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignupResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &SignupResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Locked = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Deleted = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &GetAccountResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IsUsernameAvailableRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IsUsernameAvailableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IsUsernameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Result = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LockAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnlockAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnlockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ArchiveAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ArchiveAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountRequst: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountRequst: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Locked = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &ImportAccountResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LoginRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LoginRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PasswordResetRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PasswordResetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PasswordResetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChangePasswordRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChangePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentPassword", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrentPassword = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpirePasswordRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpirePasswordRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpirePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BeginOAuthRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BeginOAuthRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeginOAuthRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProviderName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RedirectURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RedirectURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BeginOAuthResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BeginOAuthResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BeginOAuthResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OAuthReturnRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OAuthReturnRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OAuthReturnRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProviderName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OAuthReturnResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OAuthReturnResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OAuthReturnResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Redirect", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Redirect = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Configuration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Configuration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Configuration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Issuer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResponseTypesSupported = append(m.ResponseTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubjectTypesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubjectTypesSupported = append(m.SubjectTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdTokenSigningAlgValuesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdTokenSigningAlgValuesSupported = append(m.IdTokenSigningAlgValuesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimsSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClaimsSupported = append(m.ClaimsSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JwksUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JwksUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceStatsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceStatsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HealthCheckResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HealthCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Http = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Db", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Db = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Redis", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Redis = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Key) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Key: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Key: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Use", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Use = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Alg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Alg = append(m.Alg, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kty", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kty = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field E", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.E = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.N = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JWKSResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JWKSResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JWKSResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, &Key{}) + if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthn(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthn + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthn + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthn + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthAuthn + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthn + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipAuthn(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthAuthn = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthn = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_975e18bf4e534da8) } + +var fileDescriptor_authn_975e18bf4e534da8 = []byte{ + // 1495 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xdf, 0x6e, 0xd4, 0x46, + 0x17, 0x8f, 0x37, 0xc9, 0x66, 0x73, 0x36, 0xd9, 0x84, 0xd9, 0x4d, 0xb2, 0x18, 0x58, 0x56,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c, 0x11, 0x02, 0x9b, 0xbf, 0x0d, 0x6d, 0x3e, 0x4d, 0x44, 0x44, 0x00, + 0xa7, 0xf5, 0x6d, 0x98, 0x14, 0xea, 0x8b, 0x50, 0x7c, 0x0f, 0xa9, 0x14, 0xab, 0x85, 0xf3, 0xac, + 0xd6, 0x14, 0x78, 0xb3, 0x5a, 0x4d, 0xa7, 0x98, 0x52, 0xe2, 0xb9, 0x1c, 0xe7, 0x21, 0x34, 0x7a, + 0xf8, 0x69, 0x80, 0xe9, 0x60, 0x2b, 0x5a, 0x44, 0x25, 0x75, 0x97, 0x80, 0xce, 0x0b, 0x50, 0x40, + 0x09, 0x28, 0xba, 0x0b, 0xd5, 0xfb, 0x9e, 0xed, 0x85, 0xac, 0x14, 0xa9, 0xac, 0xb3, 0x12, 0xeb, + 0x72, 0x8a, 0x65, 0x42, 0x4b, 0xd6, 0x94, 0x19, 0x11, 0x62, 0x76, 0x14, 0xcd, 0x0d, 0xa5, 0xe8, + 0x4b, 0x02, 0xfd, 0x04, 0x9a, 0xd3, 0xe3, 0x89, 0x40, 0x0f, 0x04, 0xd8, 0x13, 0x68, 0x64, 0x87, + 0x89, 0x98, 0x17, 0x85, 0x23, 0x46, 0x49, 0x1f, 0xd2, 0xc7, 0x27, 0x46, 0xe7, 0xdd, 0xdd, 0x83, + 0x46, 0x76, 0x64, 0x88, 0xa1, 0x0b, 0x07, 0x89, 0xd2, 0xa3, 0x5f, 0x10, 0xe0, 0x5d, 0xb5, 0x93, + 0x23, 0x36, 0x16, 0x28, 0xfd, 0x64, 0xc2, 0xf9, 0x0a, 0x20, 0x9d, 0x0e, 0xe2, 0xb7, 0x6e, 0x64, + 0x14, 0x51, 0xdb, 0xa3, 0x1b, 0xb2, 0x0a, 0xf9, 0x0b, 0x42, 0x0b, 0xba, 0xc7, 0xff, 0x7a, 0xd4, + 0x5f, 0x0c, 0x0f, 0x04, 0x2f, 0xd1, 0x00, 0xea, 0x43, 0x13, 0x41, 0xfc, 0x04, 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 0x91, 0x10, 0x00, 0x00, +} diff --git a/grpc/authn.pb.gw.go b/grpc/authn.pb.gw.go new file mode 100644 index 0000000000..9e10cac95b --- /dev/null +++ b/grpc/authn.pb.gw.go @@ -0,0 +1,956 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: authn.proto + +/* +Package grpc is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package grpc + +import ( + "io" + "net/http" + + "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_AuthN_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignupRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Signup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateAccountRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Username); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UpdateAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +var ( + filter_AuthN_IsUsernameAvailable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_AuthN_IsUsernameAvailable_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsUsernameAvailableRequest + var metadata runtime.ServerMetadata + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_IsUsernameAvailable_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.IsUsernameAvailable(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_LockAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LockAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.LockAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UnlockAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UnlockAcount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ArchiveAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ImportAccountRequst + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ImportAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LoginRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Login(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.RefreshSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.Logout(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +var ( + filter_AuthN_RequestPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_AuthN_RequestPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PasswordResetRequest + var metadata runtime.ServerMetadata + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_RequestPasswordReset_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RequestPasswordReset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ChangePasswordRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ChangePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_ExpirePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExpirePasswordRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ExpirePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +var ( + filter_AuthN_BeginOAuth_0 = &utilities.DoubleArray{Encoding: map[string]int{"providerName": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_AuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BeginOAuthRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["providerName"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "providerName") + } + + protoReq.ProviderName, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "providerName", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_BeginOAuth_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.BeginOAuth(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_OAuthReturn_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OAuthReturnRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["providerName"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "providerName") + } + + protoReq.ProviderName, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "providerName", err) + } + + msg, err := client.OAuthReturn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.ServiceConfiguration(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.JWKS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_ServiceStats_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.ServiceStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_ServerStats_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.ServerStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.HealthCheck(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterAuthNHandlerFromEndpoint is same as RegisterAuthNHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAuthNHandler(ctx, mux, conn) +} + +// RegisterAuthNHandler registers the http handlers for service AuthN to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAuthNHandlerClient(ctx, mux, NewAuthNClient(conn)) +} + +// RegisterAuthNHandlerClient registers the http handlers for service AuthN +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthNClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthNClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AuthNClient" to call the correct interceptors. +func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthNClient) error { + + mux.Handle("POST", pattern_AuthN_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_Signup_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_Signup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_GetAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_GetAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AuthN_UpdateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_UpdateAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_UpdateAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_IsUsernameAvailable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_IsUsernameAvailable_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_IsUsernameAvailable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AuthN_LockAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_LockAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_LockAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AuthN_UnlockAcount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_UnlockAcount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_UnlockAcount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_AuthN_ArchiveAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_ArchiveAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_ArchiveAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthN_ImportAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_ImportAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthN_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_Login_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_RefreshSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_RefreshSession_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_RefreshSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_AuthN_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_Logout_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_RequestPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_RequestPasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_RequestPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthN_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AuthN_ExpirePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_ExpirePassword_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_ExpirePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_BeginOAuth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_BeginOAuth_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_BeginOAuth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_OAuthReturn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_OAuthReturn_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_OAuthReturn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_ServiceConfiguration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_ServiceConfiguration_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_ServiceConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_JWKS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_JWKS_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_JWKS_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_ServiceStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_ServiceStats_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_ServiceStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_ServerStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_ServerStats_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_ServerStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuthN_HealthCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthN_HealthCheck_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthN_HealthCheck_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_AuthN_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"accounts"}, "")) + + pattern_AuthN_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AuthN_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AuthN_IsUsernameAvailable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "available"}, "")) + + pattern_AuthN_LockAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "lock"}, "")) + + pattern_AuthN_UnlockAcount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "unlock"}, "")) + + pattern_AuthN_ArchiveAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AuthN_ImportAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "import"}, "")) + + pattern_AuthN_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) + + pattern_AuthN_RefreshSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) + + pattern_AuthN_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) + + pattern_AuthN_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"password", "reset"}, "")) + + pattern_AuthN_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"password"}, "")) + + pattern_AuthN_ExpirePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "expire_password"}, "")) + + pattern_AuthN_BeginOAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"oauth", "providerName"}, "")) + + pattern_AuthN_OAuthReturn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"oauth", "providerName", "return"}, "")) + + pattern_AuthN_ServiceConfiguration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"configuration"}, "")) + + pattern_AuthN_JWKS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"jwks"}, "")) + + pattern_AuthN_ServiceStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"stats"}, "")) + + pattern_AuthN_ServerStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"metrics"}, "")) + + pattern_AuthN_HealthCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"health"}, "")) +) + +var ( + forward_AuthN_Signup_0 = runtime.ForwardResponseMessage + + forward_AuthN_GetAccount_0 = runtime.ForwardResponseMessage + + forward_AuthN_UpdateAccount_0 = runtime.ForwardResponseMessage + + forward_AuthN_IsUsernameAvailable_0 = runtime.ForwardResponseMessage + + forward_AuthN_LockAccount_0 = runtime.ForwardResponseMessage + + forward_AuthN_UnlockAcount_0 = runtime.ForwardResponseMessage + + forward_AuthN_ArchiveAccount_0 = runtime.ForwardResponseMessage + + forward_AuthN_ImportAccount_0 = runtime.ForwardResponseMessage + + forward_AuthN_Login_0 = runtime.ForwardResponseMessage + + forward_AuthN_RefreshSession_0 = runtime.ForwardResponseMessage + + forward_AuthN_Logout_0 = runtime.ForwardResponseMessage + + forward_AuthN_RequestPasswordReset_0 = runtime.ForwardResponseMessage + + forward_AuthN_ChangePassword_0 = runtime.ForwardResponseMessage + + forward_AuthN_ExpirePassword_0 = runtime.ForwardResponseMessage + + forward_AuthN_BeginOAuth_0 = runtime.ForwardResponseMessage + + forward_AuthN_OAuthReturn_0 = runtime.ForwardResponseMessage + + forward_AuthN_ServiceConfiguration_0 = runtime.ForwardResponseMessage + + forward_AuthN_JWKS_0 = runtime.ForwardResponseMessage + + forward_AuthN_ServiceStats_0 = runtime.ForwardResponseMessage + + forward_AuthN_ServerStats_0 = runtime.ForwardResponseMessage + + forward_AuthN_HealthCheck_0 = runtime.ForwardResponseMessage +) diff --git a/grpc/authn.pb_test.go b/grpc/authn.pb_test.go new file mode 100644 index 0000000000..78dadc4e45 --- /dev/null +++ b/grpc/authn.pb_test.go @@ -0,0 +1,8 @@ +package grpc + +import ( + "testing" +) + +func TestServer(t *testing.T) { +} diff --git a/grpc/authn.proto b/grpc/authn.proto new file mode 100644 index 0000000000..85ca226128 --- /dev/null +++ b/grpc/authn.proto @@ -0,0 +1,246 @@ +syntax = "proto3"; + +package grpc; +option go_package = "grpc"; + +import "google/protobuf/empty.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +message SignupRequest { + string username = 1; + string password = 2; +} + +message SignupResponse { + string id_token = 1 [ (gogoproto.jsontag) = "id_token" ]; +} + +message SignupResponseEnvelope { SignupResponse result = 1; } + +message GetAccountRequest { string id = 1; } + +message GetAccountResponse { + int64 id = 1; + string username = 2; + bool locked = 3; + bool deleted = 4; +} + +message GetAccountResponseEnvelope { GetAccountResponse result = 1; } + +message UpdateAccountRequest { + string id = 1; + string username = 2; +} + +message IsUsernameAvailableRequest { string username = 1; } +message IsUsernameAvailableResponseEnvelope { + bool result = 1 [ (gogoproto.jsontag) = "result" ]; +} + +message LockAccountRequest { string id = 1; } + +message UnlockAccountRequest { string id = 1; } + +message ArchiveAccountRequest { string id = 1; } + +message ImportAccountRequst { + string username = 1; + string password = 2; + bool locked = 3; +} +message ImportAccountResponse { int64 id = 1 [ (gogoproto.jsontag) = "id" ]; } + +message ImportAccountResponseEnvelope { ImportAccountResponse result = 1; } + +message LoginRequest { + string username = 1; + string password = 2; +} + +message PasswordResetRequest { string username = 1; } + +message ChangePasswordRequest { + string password = 1; + string token = 2; + string currentPassword = 3; +} + +message ExpirePasswordRequest { string id = 1; } + +message BeginOAuthRequest { + string providerName = 1; + string redirectURI = 2; +} +message BeginOAuthResponse { string provider = 1; } + +message OAuthReturnRequest { string providerName = 1; } +message OAuthReturnResponse { string redirect = 1; } + +message Configuration { + string issuer = 1; + repeated string response_types_supported = 2; + repeated string subject_types_supported = 3; + repeated string id_token_signing_alg_values_supported = 4; + repeated string claims_supported = 5; + string jwks_uri = 6; +} +message ServiceStatsResponse {} + +message HealthCheckResponse { + bool http = 1; + bool db = 2; + bool redis = 3; +} + +message Key { + string use = 1; + repeated string alg = 2; + string kty = 3; + string kid = 4; + string e = 5; + string n = 6; +} +message JWKSResponse { repeated Key keys = 1; } + +service AuthN { + + rpc Signup(SignupRequest) returns (SignupResponseEnvelope) { + option (google.api.http) = { + post : "/accounts", + body : "*" + }; + } + + rpc GetAccount(GetAccountRequest) returns (GetAccountResponseEnvelope) { + option (google.api.http) = { + get : "/accounts/{id}", + }; + } + + rpc UpdateAccount(UpdateAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}", + body : "username" + }; + } + + rpc IsUsernameAvailable(IsUsernameAvailableRequest) + returns (IsUsernameAvailableResponseEnvelope) { + option (google.api.http) = { + get : "/accounts/available" + }; + } + + rpc LockAccount(LockAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/lock" + }; + } + + rpc UnlockAcount(UnlockAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/unlock" + }; + } + + rpc ArchiveAccount(ArchiveAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete : "/accounts/{id}" + }; + } + + rpc ImportAccount(ImportAccountRequst) + returns (ImportAccountResponseEnvelope) { + + option (google.api.http) = { + post : "/accounts/import", + body : "*" + }; + } + + rpc Login(LoginRequest) returns (SignupResponse) { + + option (google.api.http) = { + post : "/session", + body : "*" + }; + } + + rpc RefreshSession(google.protobuf.Empty) returns (SignupResponse) { + + option (google.api.http) = { + get : "/session" + }; + } + + rpc Logout(google.protobuf.Empty) returns (google.protobuf.Empty) { + + option (google.api.http) = { + delete : "/session" + }; + } + + rpc RequestPasswordReset(PasswordResetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + get : "/password/reset" + }; + } + + rpc ChangePassword(ChangePasswordRequest) returns (SignupResponse) { + option (google.api.http) = { + post : "/password", + body : "*" + }; + } + + rpc ExpirePassword(ExpirePasswordRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/expire_password" + }; + } + + rpc BeginOAuth(BeginOAuthRequest) returns (BeginOAuthResponse) { + option (google.api.http) = { + get : "/oauth/{providerName}" + }; + } + + rpc OAuthReturn(OAuthReturnRequest) returns (OAuthReturnResponse) { + option (google.api.http) = { + get : "/oauth/{providerName}/return" + }; + } + + rpc ServiceConfiguration(google.protobuf.Empty) returns (Configuration) { + option (google.api.http) = { + get : "/configuration" + }; + } + + rpc JWKS(google.protobuf.Empty) returns (JWKSResponse) { + option (google.api.http) = { + get : "/jwks" + }; + } + + rpc ServiceStats(google.protobuf.Empty) returns (ServiceStatsResponse) { + option (google.api.http) = { + get : "/stats" + }; + } + + rpc ServerStats(google.protobuf.Empty) returns (google.protobuf.Empty) { + option (google.api.http) = { + get : "/metrics" + }; + } + + rpc HealthCheck(google.protobuf.Empty) returns (HealthCheckResponse) { + option (google.api.http) = { + get : "/health" + }; + } +} \ No newline at end of file diff --git a/grpc/server.go b/grpc/server.go new file mode 100644 index 0000000000..02ddbb6f15 --- /dev/null +++ b/grpc/server.go @@ -0,0 +1,149 @@ +package grpc + +import ( + "net" + + "github.com/sirupsen/logrus" + + "github.com/gogo/protobuf/types" + + "golang.org/x/net/context" + "google.golang.org/grpc" + + "google.golang.org/grpc/credentials" +) + +// Compile-time check +var _ AuthNServer = Server{} + +type Server struct { + lis net.Listener + creds credentials.TransportCredentials +} + +// NewServer returns a new gRPC server +func NewServer(lis net.Listener, creds credentials.TransportCredentials) Server { + return Server{ + lis: lis, + creds: creds, + } +} + +func (s Server) RunGRPC(ctx context.Context) { + + srv := grpc.NewServer( + grpc.Creds(s.creds), + grpc.UnaryInterceptor(logInterceptor), + ) + + RegisterAuthNServer(srv, s) + + logrus.Infof("gRPC Listening on %s", s.lis.Addr().String()) + + go func() { + if err := srv.Serve(s.lis); err != nil { + logrus.Printf("serve error: %s", err) + return + } + }() + <-ctx.Done() + srv.Stop() +} + +func logInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + logrus.Infof("calling method: %s", info.FullMethod) + + res, err := handler(ctx, req) + if err != nil { + logrus.Errorf("error from method: %s", err) + } + return res, err +} + +func (s Server) Signup(ctx context.Context, req *SignupRequest) (*SignupResponseEnvelope, error) { + return nil, nil +} + +func (s Server) GetAccount(ctx context.Context, req *GetAccountRequest) (*GetAccountResponseEnvelope, error) { + return nil, nil +} + +func (s Server) UpdateAccount(ctx context.Context, req *UpdateAccountRequest) (*types.Empty, error) { + return nil, nil +} + +func (s Server) IsUsernameAvailable(ctx context.Context, req *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) { + return nil, nil +} + +func (s Server) LockAccount(ctx context.Context, req *LockAccountRequest) (*types.Empty, error) { + return nil, nil +} + +func (s Server) UnlockAcount(ctx context.Context, req *UnlockAccountRequest) (*types.Empty, error) { + return nil, nil +} + +func (s Server) ArchiveAccount(ctx context.Context, req *ArchiveAccountRequest) (*types.Empty, error) { + return nil, nil +} + +func (s Server) ImportAccount(ctx context.Context, req *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) { + return nil, nil +} + +// Session Management +func (s Server) Login(ctx context.Context, req *LoginRequest) (*SignupResponse, error) { + return nil, nil +} + +func (s Server) RefreshSession(ctx context.Context, req *types.Empty) (*SignupResponse, error) { + return nil, nil +} + +func (s Server) Logout(ctx context.Context, req *types.Empty) (*types.Empty, error) { + return nil, nil +} + +// Password Management +func (s Server) RequestPasswordReset(ctx context.Context, req *PasswordResetRequest) (*types.Empty, error) { + return nil, nil +} + +func (s Server) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*SignupResponse, error) { + return nil, nil +} + +func (s Server) ExpirePassword(ctx context.Context, req *ExpirePasswordRequest) (*types.Empty, error) { + return nil, nil +} + +// OAuth +func (s Server) BeginOAuth(ctx context.Context, req *BeginOAuthRequest) (*BeginOAuthResponse, error) { + return nil, nil +} + +func (s Server) OAuthReturn(ctx context.Context, req *OAuthReturnRequest) (*OAuthReturnResponse, error) { + return nil, nil +} + +// Config +func (s Server) ServiceConfiguration(ctx context.Context, req *types.Empty) (*Configuration, error) { + return nil, nil +} + +func (s Server) JWKS(ctx context.Context, req *types.Empty) (*JWKSResponse, error) { + return nil, nil +} + +func (s Server) ServiceStats(ctx context.Context, req *types.Empty) (*ServiceStatsResponse, error) { + return nil, nil +} + +func (s Server) ServerStats(ctx context.Context, req *types.Empty) (*types.Empty, error) { + return nil, nil +} + +func (s Server) HealthCheck(ctx context.Context, req *types.Empty) (*HealthCheckResponse, error) { + return nil, nil +} From 24bcf8220babc07ad4db561d47c41252c20e7a44 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 8 Dec 2018 21:56:10 +0300 Subject: [PATCH 2/7] Break proto files into public and private API --- Makefile | 8 +- grpc/authn-private.pb.go | 3944 +++++++++++++++++++ grpc/authn-private.pb.gw.go | 455 +++ grpc/authn-private.proto | 106 + grpc/authn.pb.go | 7148 ++++++++++------------------------- grpc/authn.pb.gw.go | 591 +-- grpc/authn.pb_test.go | 40 + grpc/authn.proto | 95 +- 8 files changed, 6716 insertions(+), 5671 deletions(-) create mode 100644 grpc/authn-private.pb.go create mode 100644 grpc/authn-private.pb.gw.go create mode 100644 grpc/authn-private.proto diff --git a/Makefile b/Makefile index a4227ddb7e..340e592ad5 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,9 @@ generate-grpc: Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\ Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:./grpc \ - grpc/authn.proto - # Workaround for https://github.com/grpc-ecosystem/grpc-gateway/issues/229. + grpc/authn.proto grpc/authn-private.proto + # Workaround for https://github.com/grpc-ecosystem/grpc-gateway/issues/229 sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn.pb.gw.go && rm grpc/authn.pb.gw.go.bak - sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn.pb.go && rm grpc/authn.pb.go.bak \ No newline at end of file + sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn.pb.go && rm grpc/authn.pb.go.bak + sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn-private.pb.gw.go && rm grpc/authn-private.pb.gw.go.bak + sed -i.bak "s/empty.Empty/types.Empty/g" grpc/authn-private.pb.go && rm grpc/authn-private.pb.go.bak \ No newline at end of file diff --git a/grpc/authn-private.pb.go b/grpc/authn-private.pb.go new file mode 100644 index 0000000000..ea1089f8ae --- /dev/null +++ b/grpc/authn-private.pb.go @@ -0,0 +1,3944 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: authn-private.proto + +package grpc + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/googleapis/google/api" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type GetAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountRequest) Reset() { *m = GetAccountRequest{} } +func (*GetAccountRequest) ProtoMessage() {} +func (*GetAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{0} +} +func (m *GetAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountRequest.Merge(dst, src) +} +func (m *GetAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *GetAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountRequest proto.InternalMessageInfo + +func (m *GetAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type GetAccountResponse struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` + Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountResponse) Reset() { *m = GetAccountResponse{} } +func (*GetAccountResponse) ProtoMessage() {} +func (*GetAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{1} +} +func (m *GetAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountResponse.Merge(dst, src) +} +func (m *GetAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *GetAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountResponse proto.InternalMessageInfo + +func (m *GetAccountResponse) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *GetAccountResponse) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *GetAccountResponse) GetLocked() bool { + if m != nil { + return m.Locked + } + return false +} + +func (m *GetAccountResponse) GetDeleted() bool { + if m != nil { + return m.Deleted + } + return false +} + +type GetAccountResponseEnvelope struct { + Result *GetAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAccountResponseEnvelope) Reset() { *m = GetAccountResponseEnvelope{} } +func (*GetAccountResponseEnvelope) ProtoMessage() {} +func (*GetAccountResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{2} +} +func (m *GetAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAccountResponseEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAccountResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAccountResponseEnvelope.Merge(dst, src) +} +func (m *GetAccountResponseEnvelope) XXX_Size() int { + return m.Size() +} +func (m *GetAccountResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_GetAccountResponseEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAccountResponseEnvelope proto.InternalMessageInfo + +func (m *GetAccountResponseEnvelope) GetResult() *GetAccountResponse { + if m != nil { + return m.Result + } + return nil +} + +type UpdateAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateAccountRequest) Reset() { *m = UpdateAccountRequest{} } +func (*UpdateAccountRequest) ProtoMessage() {} +func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{3} +} +func (m *UpdateAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UpdateAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAccountRequest.Merge(dst, src) +} +func (m *UpdateAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *UpdateAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAccountRequest proto.InternalMessageInfo + +func (m *UpdateAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *UpdateAccountRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type LockAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LockAccountRequest) Reset() { *m = LockAccountRequest{} } +func (*LockAccountRequest) ProtoMessage() {} +func (*LockAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{4} +} +func (m *LockAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LockAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *LockAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LockAccountRequest.Merge(dst, src) +} +func (m *LockAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *LockAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LockAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LockAccountRequest proto.InternalMessageInfo + +func (m *LockAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type UnlockAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnlockAccountRequest) Reset() { *m = UnlockAccountRequest{} } +func (*UnlockAccountRequest) ProtoMessage() {} +func (*UnlockAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{5} +} +func (m *UnlockAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnlockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnlockAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnlockAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnlockAccountRequest.Merge(dst, src) +} +func (m *UnlockAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *UnlockAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UnlockAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UnlockAccountRequest proto.InternalMessageInfo + +func (m *UnlockAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type ArchiveAccountRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ArchiveAccountRequest) Reset() { *m = ArchiveAccountRequest{} } +func (*ArchiveAccountRequest) ProtoMessage() {} +func (*ArchiveAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{6} +} +func (m *ArchiveAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ArchiveAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ArchiveAccountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ArchiveAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArchiveAccountRequest.Merge(dst, src) +} +func (m *ArchiveAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *ArchiveAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ArchiveAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ArchiveAccountRequest proto.InternalMessageInfo + +func (m *ArchiveAccountRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type ImportAccountRequst struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountRequst) Reset() { *m = ImportAccountRequst{} } +func (*ImportAccountRequst) ProtoMessage() {} +func (*ImportAccountRequst) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{7} +} +func (m *ImportAccountRequst) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountRequst) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountRequst.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountRequst) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountRequst.Merge(dst, src) +} +func (m *ImportAccountRequst) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountRequst) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountRequst.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountRequst proto.InternalMessageInfo + +func (m *ImportAccountRequst) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *ImportAccountRequst) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +func (m *ImportAccountRequst) GetLocked() bool { + if m != nil { + return m.Locked + } + return false +} + +type ImportAccountResponse struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountResponse) Reset() { *m = ImportAccountResponse{} } +func (*ImportAccountResponse) ProtoMessage() {} +func (*ImportAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{8} +} +func (m *ImportAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountResponse.Merge(dst, src) +} +func (m *ImportAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountResponse proto.InternalMessageInfo + +func (m *ImportAccountResponse) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +type ImportAccountResponseEnvelope struct { + Result *ImportAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ImportAccountResponseEnvelope) Reset() { *m = ImportAccountResponseEnvelope{} } +func (*ImportAccountResponseEnvelope) ProtoMessage() {} +func (*ImportAccountResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{9} +} +func (m *ImportAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImportAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImportAccountResponseEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ImportAccountResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportAccountResponseEnvelope.Merge(dst, src) +} +func (m *ImportAccountResponseEnvelope) XXX_Size() int { + return m.Size() +} +func (m *ImportAccountResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_ImportAccountResponseEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_ImportAccountResponseEnvelope proto.InternalMessageInfo + +func (m *ImportAccountResponseEnvelope) GetResult() *ImportAccountResponse { + if m != nil { + return m.Result + } + return nil +} + +type ExpirePasswordRequest struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExpirePasswordRequest) Reset() { *m = ExpirePasswordRequest{} } +func (*ExpirePasswordRequest) ProtoMessage() {} +func (*ExpirePasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{10} +} +func (m *ExpirePasswordRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpirePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExpirePasswordRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ExpirePasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpirePasswordRequest.Merge(dst, src) +} +func (m *ExpirePasswordRequest) XXX_Size() int { + return m.Size() +} +func (m *ExpirePasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ExpirePasswordRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpirePasswordRequest proto.InternalMessageInfo + +func (m *ExpirePasswordRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +type ServiceStatsResponse struct { + Actives *ServiceStatsResponseActiveStats `protobuf:"bytes,1,opt,name=actives" json:"actives,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceStatsResponse) Reset() { *m = ServiceStatsResponse{} } +func (*ServiceStatsResponse) ProtoMessage() {} +func (*ServiceStatsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{11} +} +func (m *ServiceStatsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceStatsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ServiceStatsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceStatsResponse.Merge(dst, src) +} +func (m *ServiceStatsResponse) XXX_Size() int { + return m.Size() +} +func (m *ServiceStatsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceStatsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceStatsResponse proto.InternalMessageInfo + +func (m *ServiceStatsResponse) GetActives() *ServiceStatsResponseActiveStats { + if m != nil { + return m.Actives + } + return nil +} + +type ServiceStatsResponseActiveStats struct { + Daily map[string]int64 `protobuf:"bytes,1,rep,name=daily" json:"daily,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Weekly map[string]int64 `protobuf:"bytes,2,rep,name=weekly" json:"weekly,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Monthly map[string]int64 `protobuf:"bytes,3,rep,name=monthly" json:"monthly,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceStatsResponseActiveStats) Reset() { *m = ServiceStatsResponseActiveStats{} } +func (*ServiceStatsResponseActiveStats) ProtoMessage() {} +func (*ServiceStatsResponseActiveStats) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_d4727a028c8ad90a, []int{11, 0} +} +func (m *ServiceStatsResponseActiveStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceStatsResponseActiveStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceStatsResponseActiveStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ServiceStatsResponseActiveStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceStatsResponseActiveStats.Merge(dst, src) +} +func (m *ServiceStatsResponseActiveStats) XXX_Size() int { + return m.Size() +} +func (m *ServiceStatsResponseActiveStats) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceStatsResponseActiveStats.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceStatsResponseActiveStats proto.InternalMessageInfo + +func (m *ServiceStatsResponseActiveStats) GetDaily() map[string]int64 { + if m != nil { + return m.Daily + } + return nil +} + +func (m *ServiceStatsResponseActiveStats) GetWeekly() map[string]int64 { + if m != nil { + return m.Weekly + } + return nil +} + +func (m *ServiceStatsResponseActiveStats) GetMonthly() map[string]int64 { + if m != nil { + return m.Monthly + } + return nil +} + +func init() { + proto.RegisterType((*GetAccountRequest)(nil), "grpc.GetAccountRequest") + proto.RegisterType((*GetAccountResponse)(nil), "grpc.GetAccountResponse") + proto.RegisterType((*GetAccountResponseEnvelope)(nil), "grpc.GetAccountResponseEnvelope") + proto.RegisterType((*UpdateAccountRequest)(nil), "grpc.UpdateAccountRequest") + proto.RegisterType((*LockAccountRequest)(nil), "grpc.LockAccountRequest") + proto.RegisterType((*UnlockAccountRequest)(nil), "grpc.UnlockAccountRequest") + proto.RegisterType((*ArchiveAccountRequest)(nil), "grpc.ArchiveAccountRequest") + proto.RegisterType((*ImportAccountRequst)(nil), "grpc.ImportAccountRequst") + proto.RegisterType((*ImportAccountResponse)(nil), "grpc.ImportAccountResponse") + proto.RegisterType((*ImportAccountResponseEnvelope)(nil), "grpc.ImportAccountResponseEnvelope") + proto.RegisterType((*ExpirePasswordRequest)(nil), "grpc.ExpirePasswordRequest") + proto.RegisterType((*ServiceStatsResponse)(nil), "grpc.ServiceStatsResponse") + proto.RegisterType((*ServiceStatsResponseActiveStats)(nil), "grpc.ServiceStatsResponse.active_stats") + proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.DailyEntry") + proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.MonthlyEntry") + proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.WeeklyEntry") +} +func (this *GetAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountRequest) + if !ok { + that2, ok := that.(GetAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *GetAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountResponse) + if !ok { + that2, ok := that.(GetAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Username != that1.Username { + return false + } + if this.Locked != that1.Locked { + return false + } + if this.Deleted != that1.Deleted { + return false + } + return true +} +func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetAccountResponseEnvelope) + if !ok { + that2, ok := that.(GetAccountResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Result.Equal(that1.Result) { + return false + } + return true +} +func (this *UpdateAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UpdateAccountRequest) + if !ok { + that2, ok := that.(UpdateAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Username != that1.Username { + return false + } + return true +} +func (this *LockAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LockAccountRequest) + if !ok { + that2, ok := that.(LockAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *UnlockAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnlockAccountRequest) + if !ok { + that2, ok := that.(UnlockAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ArchiveAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ArchiveAccountRequest) + if !ok { + that2, ok := that.(ArchiveAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ImportAccountRequst) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountRequst) + if !ok { + that2, ok := that.(ImportAccountRequst) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + if this.Password != that1.Password { + return false + } + if this.Locked != that1.Locked { + return false + } + return true +} +func (this *ImportAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountResponse) + if !ok { + that2, ok := that.(ImportAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ImportAccountResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountResponseEnvelope) + if !ok { + that2, ok := that.(ImportAccountResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Result.Equal(that1.Result) { + return false + } + return true +} +func (this *ExpirePasswordRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ExpirePasswordRequest) + if !ok { + that2, ok := that.(ExpirePasswordRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ServiceStatsResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ServiceStatsResponse) + if !ok { + that2, ok := that.(ServiceStatsResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Actives.Equal(that1.Actives) { + return false + } + return true +} +func (this *ServiceStatsResponseActiveStats) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ServiceStatsResponseActiveStats) + if !ok { + that2, ok := that.(ServiceStatsResponseActiveStats) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Daily) != len(that1.Daily) { + return false + } + for i := range this.Daily { + if this.Daily[i] != that1.Daily[i] { + return false + } + } + if len(this.Weekly) != len(that1.Weekly) { + return false + } + for i := range this.Weekly { + if this.Weekly[i] != that1.Weekly[i] { + return false + } + } + if len(this.Monthly) != len(that1.Monthly) { + return false + } + for i := range this.Monthly { + if this.Monthly[i] != that1.Monthly[i] { + return false + } + } + return true +} +func (this *GetAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.GetAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&grpc.GetAccountResponse{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") + s = append(s, "Deleted: "+fmt.Sprintf("%#v", this.Deleted)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetAccountResponseEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.GetAccountResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UpdateAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&grpc.UpdateAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LockAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.LockAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnlockAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.UnlockAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ArchiveAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ArchiveAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountRequst) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&grpc.ImportAccountRequst{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ImportAccountResponse{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ImportAccountResponseEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ImportAccountResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ExpirePasswordRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ExpirePasswordRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceStatsResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.ServiceStatsResponse{") + if this.Actives != nil { + s = append(s, "Actives: "+fmt.Sprintf("%#v", this.Actives)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceStatsResponseActiveStats) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&grpc.ServiceStatsResponseActiveStats{") + keysForDaily := make([]string, 0, len(this.Daily)) + for k, _ := range this.Daily { + keysForDaily = append(keysForDaily, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForDaily) + mapStringForDaily := "map[string]int64{" + for _, k := range keysForDaily { + mapStringForDaily += fmt.Sprintf("%#v: %#v,", k, this.Daily[k]) + } + mapStringForDaily += "}" + if this.Daily != nil { + s = append(s, "Daily: "+mapStringForDaily+",\n") + } + keysForWeekly := make([]string, 0, len(this.Weekly)) + for k, _ := range this.Weekly { + keysForWeekly = append(keysForWeekly, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForWeekly) + mapStringForWeekly := "map[string]int64{" + for _, k := range keysForWeekly { + mapStringForWeekly += fmt.Sprintf("%#v: %#v,", k, this.Weekly[k]) + } + mapStringForWeekly += "}" + if this.Weekly != nil { + s = append(s, "Weekly: "+mapStringForWeekly+",\n") + } + keysForMonthly := make([]string, 0, len(this.Monthly)) + for k, _ := range this.Monthly { + keysForMonthly = append(keysForMonthly, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMonthly) + mapStringForMonthly := "map[string]int64{" + for _, k := range keysForMonthly { + mapStringForMonthly += fmt.Sprintf("%#v: %#v,", k, this.Monthly[k]) + } + mapStringForMonthly += "}" + if this.Monthly != nil { + s = append(s, "Monthly: "+mapStringForMonthly+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringAuthnPrivate(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// AdminAuthNClient is the client API for AdminAuthN service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AdminAuthNClient interface { + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) + ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) + ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) + ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) +} + +type adminAuthNClient struct { + cc *grpc.ClientConn +} + +func NewAdminAuthNClient(cc *grpc.ClientConn) AdminAuthNClient { + return &adminAuthNClient{cc} +} + +func (c *adminAuthNClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) { + out := new(GetAccountResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/GetAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/UpdateAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/LockAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/UnlockAcount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ArchiveAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) { + out := new(ImportAccountResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ImportAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ExpirePassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminAuthNClient) ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) { + out := new(ServiceStatsResponse) + err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ServiceStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AdminAuthNServer is the server API for AdminAuthN service. +type AdminAuthNServer interface { + GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponseEnvelope, error) + UpdateAccount(context.Context, *UpdateAccountRequest) (*types.Empty, error) + LockAccount(context.Context, *LockAccountRequest) (*types.Empty, error) + UnlockAcount(context.Context, *UnlockAccountRequest) (*types.Empty, error) + ArchiveAccount(context.Context, *ArchiveAccountRequest) (*types.Empty, error) + ImportAccount(context.Context, *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) + ExpirePassword(context.Context, *ExpirePasswordRequest) (*types.Empty, error) + ServiceStats(context.Context, *types.Empty) (*ServiceStatsResponse, error) +} + +func RegisterAdminAuthNServer(s *grpc.Server, srv AdminAuthNServer) { + s.RegisterService(&_AdminAuthN_serviceDesc, srv) +} + +func _AdminAuthN_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/GetAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).GetAccount(ctx, req.(*GetAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).UpdateAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/UpdateAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).UpdateAccount(ctx, req.(*UpdateAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_LockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LockAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).LockAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/LockAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).LockAccount(ctx, req.(*LockAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_UnlockAcount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnlockAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).UnlockAcount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/UnlockAcount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).UnlockAcount(ctx, req.(*UnlockAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_ArchiveAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).ArchiveAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/ArchiveAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).ArchiveAccount(ctx, req.(*ArchiveAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_ImportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportAccountRequst) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).ImportAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/ImportAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).ImportAccount(ctx, req.(*ImportAccountRequst)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_ExpirePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExpirePasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).ExpirePassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/ExpirePassword", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).ExpirePassword(ctx, req.(*ExpirePasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminAuthN_ServiceStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminAuthNServer).ServiceStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.AdminAuthN/ServiceStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminAuthNServer).ServiceStats(ctx, req.(*types.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _AdminAuthN_serviceDesc = grpc.ServiceDesc{ + ServiceName: "grpc.AdminAuthN", + HandlerType: (*AdminAuthNServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAccount", + Handler: _AdminAuthN_GetAccount_Handler, + }, + { + MethodName: "UpdateAccount", + Handler: _AdminAuthN_UpdateAccount_Handler, + }, + { + MethodName: "LockAccount", + Handler: _AdminAuthN_LockAccount_Handler, + }, + { + MethodName: "UnlockAcount", + Handler: _AdminAuthN_UnlockAcount_Handler, + }, + { + MethodName: "ArchiveAccount", + Handler: _AdminAuthN_ArchiveAccount_Handler, + }, + { + MethodName: "ImportAccount", + Handler: _AdminAuthN_ImportAccount_Handler, + }, + { + MethodName: "ExpirePassword", + Handler: _AdminAuthN_ExpirePassword_Handler, + }, + { + MethodName: "ServiceStats", + Handler: _AdminAuthN_ServiceStats_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn-private.proto", +} + +func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *GetAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } + if len(m.Username) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if m.Locked { + dAtA[i] = 0x18 + i++ + if m.Locked { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Deleted { + dAtA[i] = 0x20 + i++ + if m.Deleted { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *GetAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Result.Size())) + n1, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *UpdateAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.Username) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *LockAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LockAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *UnlockAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnlockAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *ArchiveAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ArchiveAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *ImportAccountRequst) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountRequst) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + if m.Locked { + dAtA[i] = 0x18 + i++ + if m.Locked { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ImportAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } + return i, nil +} + +func (m *ImportAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Result.Size())) + n2, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func (m *ExpirePasswordRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpirePasswordRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + return i, nil +} + +func (m *ServiceStatsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceStatsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Actives != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Actives.Size())) + n3, err := m.Actives.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} + +func (m *ServiceStatsResponseActiveStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceStatsResponseActiveStats) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Daily) > 0 { + for k, _ := range m.Daily { + dAtA[i] = 0xa + i++ + v := m.Daily[k] + mapSize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(v)) + } + } + if len(m.Weekly) > 0 { + for k, _ := range m.Weekly { + dAtA[i] = 0x12 + i++ + v := m.Weekly[k] + mapSize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(v)) + } + } + if len(m.Monthly) > 0 { + for k, _ := range m.Monthly { + dAtA[i] = 0x1a + i++ + v := m.Monthly[k] + mapSize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(v)) + } + } + return i, nil +} + +func encodeVarintAuthnPrivate(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *GetAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *GetAccountResponse) Size() (n int) { + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) + } + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + if m.Locked { + n += 2 + } + if m.Deleted { + n += 2 + } + return n +} + +func (m *GetAccountResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *UpdateAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *LockAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *UnlockAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ArchiveAccountRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ImportAccountRequst) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + if m.Locked { + n += 2 + } + return n +} + +func (m *ImportAccountResponse) Size() (n int) { + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) + } + return n +} + +func (m *ImportAccountResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ExpirePasswordRequest) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ServiceStatsResponse) Size() (n int) { + var l int + _ = l + if m.Actives != nil { + l = m.Actives.Size() + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ServiceStatsResponseActiveStats) Size() (n int) { + var l int + _ = l + if len(m.Daily) > 0 { + for k, v := range m.Daily { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + n += mapEntrySize + 1 + sovAuthnPrivate(uint64(mapEntrySize)) + } + } + if len(m.Weekly) > 0 { + for k, v := range m.Weekly { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + n += mapEntrySize + 1 + sovAuthnPrivate(uint64(mapEntrySize)) + } + } + if len(m.Monthly) > 0 { + for k, v := range m.Monthly { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + n += mapEntrySize + 1 + sovAuthnPrivate(uint64(mapEntrySize)) + } + } + return n +} + +func sovAuthnPrivate(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAuthnPrivate(x uint64) (n int) { + return sovAuthnPrivate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *GetAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *GetAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountResponse{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, + `Deleted:` + fmt.Sprintf("%v", this.Deleted) + `,`, + `}`, + }, "") + return s +} +func (this *GetAccountResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAccountResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "GetAccountResponse", "GetAccountResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *LockAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LockAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *UnlockAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnlockAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ArchiveAccountRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ArchiveAccountRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountRequst) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountRequst{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountResponse{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ImportAccountResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImportAccountResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "ImportAccountResponse", "ImportAccountResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ExpirePasswordRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExpirePasswordRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceStatsResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceStatsResponse{`, + `Actives:` + strings.Replace(fmt.Sprintf("%v", this.Actives), "ServiceStatsResponseActiveStats", "ServiceStatsResponseActiveStats", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceStatsResponseActiveStats) String() string { + if this == nil { + return "nil" + } + keysForDaily := make([]string, 0, len(this.Daily)) + for k, _ := range this.Daily { + keysForDaily = append(keysForDaily, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForDaily) + mapStringForDaily := "map[string]int64{" + for _, k := range keysForDaily { + mapStringForDaily += fmt.Sprintf("%v: %v,", k, this.Daily[k]) + } + mapStringForDaily += "}" + keysForWeekly := make([]string, 0, len(this.Weekly)) + for k, _ := range this.Weekly { + keysForWeekly = append(keysForWeekly, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForWeekly) + mapStringForWeekly := "map[string]int64{" + for _, k := range keysForWeekly { + mapStringForWeekly += fmt.Sprintf("%v: %v,", k, this.Weekly[k]) + } + mapStringForWeekly += "}" + keysForMonthly := make([]string, 0, len(this.Monthly)) + for k, _ := range this.Monthly { + keysForMonthly = append(keysForMonthly, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMonthly) + mapStringForMonthly := "map[string]int64{" + for _, k := range keysForMonthly { + mapStringForMonthly += fmt.Sprintf("%v: %v,", k, this.Monthly[k]) + } + mapStringForMonthly += "}" + s := strings.Join([]string{`&ServiceStatsResponseActiveStats{`, + `Daily:` + mapStringForDaily + `,`, + `Weekly:` + mapStringForWeekly + `,`, + `Monthly:` + mapStringForMonthly + `,`, + `}`, + }, "") + return s +} +func valueToStringAuthnPrivate(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Locked = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Deleted = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &GetAccountResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LockAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnlockAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnlockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ArchiveAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ArchiveAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountRequst: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountRequst: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Locked = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImportAccountResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &ImportAccountResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpirePasswordRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpirePasswordRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpirePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceStatsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceStatsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Actives", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Actives == nil { + m.Actives = &ServiceStatsResponseActiveStats{} + } + if err := m.Actives.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceStatsResponseActiveStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: active_stats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: active_stats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Daily", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Daily == nil { + m.Daily = make(map[string]int64) + } + var mapkey string + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthAuthnPrivate + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Daily[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Weekly", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Weekly == nil { + m.Weekly = make(map[string]int64) + } + var mapkey string + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthAuthnPrivate + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Weekly[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Monthly", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Monthly == nil { + m.Monthly = make(map[string]int64) + } + var mapkey string + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthAuthnPrivate + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Monthly[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthnPrivate(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthAuthnPrivate + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipAuthnPrivate(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthAuthnPrivate = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthnPrivate = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("authn-private.proto", fileDescriptor_authn_private_d4727a028c8ad90a) } + +var fileDescriptor_authn_private_d4727a028c8ad90a = []byte{ + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcd, 0x6e, 0xf3, 0x54, + 0x10, 0x8d, 0x93, 0x7e, 0x69, 0x98, 0xe4, 0x8b, 0xca, 0x6d, 0x92, 0x9a, 0x5b, 0x6a, 0x22, 0x17, + 0xb5, 0x55, 0xa5, 0xda, 0x28, 0x65, 0x51, 0xb2, 0x4b, 0x45, 0x04, 0x08, 0xa8, 0x50, 0x4a, 0x85, + 0x84, 0x40, 0x95, 0x6b, 0x5f, 0x12, 0x2b, 0x8e, 0xaf, 0xb1, 0xaf, 0x53, 0x22, 0x84, 0x84, 0xfa, + 0x04, 0x48, 0x3c, 0x03, 0x88, 0x47, 0x61, 0x59, 0x89, 0x0d, 0x2b, 0x44, 0x03, 0x0b, 0xc4, 0xaa, + 0x8f, 0xf0, 0xc9, 0xd7, 0x76, 0xe2, 0x24, 0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, 0x24, + 0xfc, 0xf4, 0x8f, 0x94, 0xfb, 0x92, 0xff, 0x0b, 0xb9, 0x2a, 0x72, 0xbe, 0xe3, 0x57, 0x01, 0x00, + 0x00, 0xff, 0xff, 0xef, 0xb0, 0xa6, 0xaf, 0xa9, 0x08, 0x00, 0x00, +} diff --git a/grpc/authn-private.pb.gw.go b/grpc/authn-private.pb.gw.go new file mode 100644 index 0000000000..8e9afc5c84 --- /dev/null +++ b/grpc/authn-private.pb.gw.go @@ -0,0 +1,455 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: authn-private.proto + +/* +Package grpc is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package grpc + +import ( + "io" + "net/http" + + "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_AdminAuthN_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateAccountRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Username); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UpdateAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_LockAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LockAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.LockAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UnlockAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UnlockAcount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ArchiveAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ImportAccountRequst + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ImportAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_ExpirePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExpirePasswordRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ExpirePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AdminAuthN_ServiceStats_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq types.Empty + var metadata runtime.ServerMetadata + + msg, err := client.ServiceStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterAdminAuthNHandlerFromEndpoint is same as RegisterAdminAuthNHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAdminAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAdminAuthNHandler(ctx, mux, conn) +} + +// RegisterAdminAuthNHandler registers the http handlers for service AdminAuthN to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAdminAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAdminAuthNHandlerClient(ctx, mux, NewAdminAuthNClient(conn)) +} + +// RegisterAdminAuthNHandlerClient registers the http handlers for service AdminAuthN +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AdminAuthNClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AdminAuthNClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AdminAuthNClient" to call the correct interceptors. +func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdminAuthNClient) error { + + mux.Handle("GET", pattern_AdminAuthN_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_GetAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_GetAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AdminAuthN_UpdateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_UpdateAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_UpdateAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AdminAuthN_LockAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_LockAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_LockAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AdminAuthN_UnlockAcount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_UnlockAcount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_UnlockAcount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_AdminAuthN_ArchiveAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_ArchiveAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_ArchiveAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AdminAuthN_ImportAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_ImportAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_AdminAuthN_ExpirePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_ExpirePassword_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_ExpirePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AdminAuthN_ServiceStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AdminAuthN_ServiceStats_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AdminAuthN_ServiceStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_AdminAuthN_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AdminAuthN_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AdminAuthN_LockAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "lock"}, "")) + + pattern_AdminAuthN_UnlockAcount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "unlock"}, "")) + + pattern_AdminAuthN_ArchiveAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_AdminAuthN_ImportAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "import"}, "")) + + pattern_AdminAuthN_ExpirePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "expire_password"}, "")) + + pattern_AdminAuthN_ServiceStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"stats"}, "")) +) + +var ( + forward_AdminAuthN_GetAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_UpdateAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_LockAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_UnlockAcount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_ArchiveAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_ImportAccount_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_ExpirePassword_0 = runtime.ForwardResponseMessage + + forward_AdminAuthN_ServiceStats_0 = runtime.ForwardResponseMessage +) diff --git a/grpc/authn-private.proto b/grpc/authn-private.proto new file mode 100644 index 0000000000..9b2260d0ac --- /dev/null +++ b/grpc/authn-private.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; + +package grpc; +option go_package = "grpc"; + +import "google/protobuf/empty.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +message GetAccountRequest { string id = 1; } + +message GetAccountResponse { + int64 id = 1; + string username = 2; + bool locked = 3; + bool deleted = 4; +} + +message GetAccountResponseEnvelope { GetAccountResponse result = 1; } + +message UpdateAccountRequest { + string id = 1; + string username = 2; +} + + +message LockAccountRequest { string id = 1; } + +message UnlockAccountRequest { string id = 1; } + +message ArchiveAccountRequest { string id = 1; } + +message ImportAccountRequst { + string username = 1; + string password = 2; + bool locked = 3; +} +message ImportAccountResponse { int64 id = 1 [ (gogoproto.jsontag) = "id" ]; } + +message ImportAccountResponseEnvelope { ImportAccountResponse result = 1; } + + +message ExpirePasswordRequest { string id = 1; } + +message ServiceStatsResponse { + message active_stats { + map daily = 1; + map weekly = 2; + map monthly = 3; + } + active_stats actives = 1; +} + +service AdminAuthN { + + rpc GetAccount(GetAccountRequest) returns (GetAccountResponseEnvelope) { + option (google.api.http) = { + get : "/accounts/{id}", + }; + } + + rpc UpdateAccount(UpdateAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}", + body : "username" + }; + } + + rpc LockAccount(LockAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/lock" + }; + } + + rpc UnlockAcount(UnlockAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/unlock" + }; + } + + rpc ArchiveAccount(ArchiveAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete : "/accounts/{id}" + }; + } + + rpc ImportAccount(ImportAccountRequst) + returns (ImportAccountResponseEnvelope) { + option (google.api.http) = { + post : "/accounts/import", + body : "*" + }; + } + + rpc ExpirePassword(ExpirePasswordRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + put : "/accounts/{id}/expire_password" + }; + } + + rpc ServiceStats(google.protobuf.Empty) returns (ServiceStatsResponse) { + option (google.api.http) = { + get : "/stats" + }; + } +} \ No newline at end of file diff --git a/grpc/authn.pb.go b/grpc/authn.pb.go index f64d8cb6de..fcaf049c14 100644 --- a/grpc/authn.pb.go +++ b/grpc/authn.pb.go @@ -41,7 +41,7 @@ type SignupRequest struct { func (m *SignupRequest) Reset() { *m = SignupRequest{} } func (*SignupRequest) ProtoMessage() {} func (*SignupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{0} + return fileDescriptor_authn_44d0ba90dadea045, []int{0} } func (m *SignupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ type SignupResponse struct { func (m *SignupResponse) Reset() { *m = SignupResponse{} } func (*SignupResponse) ProtoMessage() {} func (*SignupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{1} + return fileDescriptor_authn_44d0ba90dadea045, []int{1} } func (m *SignupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -138,7 +138,7 @@ type SignupResponseEnvelope struct { func (m *SignupResponseEnvelope) Reset() { *m = SignupResponseEnvelope{} } func (*SignupResponseEnvelope) ProtoMessage() {} func (*SignupResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{2} + return fileDescriptor_authn_44d0ba90dadea045, []int{2} } func (m *SignupResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -174,23 +174,23 @@ func (m *SignupResponseEnvelope) GetResult() *SignupResponse { return nil } -type GetAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type IsUsernameAvailableRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetAccountRequest) Reset() { *m = GetAccountRequest{} } -func (*GetAccountRequest) ProtoMessage() {} -func (*GetAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{3} +func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } +func (*IsUsernameAvailableRequest) ProtoMessage() {} +func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{3} } -func (m *GetAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *IsUsernameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GetAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_IsUsernameAvailableRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -200,45 +200,42 @@ func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (dst *GetAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountRequest.Merge(dst, src) +func (dst *IsUsernameAvailableRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsUsernameAvailableRequest.Merge(dst, src) } -func (m *GetAccountRequest) XXX_Size() int { +func (m *IsUsernameAvailableRequest) XXX_Size() int { return m.Size() } -func (m *GetAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountRequest.DiscardUnknown(m) +func (m *IsUsernameAvailableRequest) XXX_DiscardUnknown() { + xxx_messageInfo_IsUsernameAvailableRequest.DiscardUnknown(m) } -var xxx_messageInfo_GetAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_IsUsernameAvailableRequest proto.InternalMessageInfo -func (m *GetAccountRequest) GetId() string { +func (m *IsUsernameAvailableRequest) GetUsername() string { if m != nil { - return m.Id + return m.Username } return "" } -type GetAccountResponse struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` - Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"` +type IsUsernameAvailableResponseEnvelope struct { + Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetAccountResponse) Reset() { *m = GetAccountResponse{} } -func (*GetAccountResponse) ProtoMessage() {} -func (*GetAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{4} +func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } +func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} +func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{4} } -func (m *GetAccountResponse) XXX_Unmarshal(b []byte) error { +func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GetAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *IsUsernameAvailableResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GetAccountResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -248,63 +245,43 @@ func (m *GetAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *GetAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountResponse.Merge(dst, src) +func (dst *IsUsernameAvailableResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Merge(dst, src) } -func (m *GetAccountResponse) XXX_Size() int { +func (m *IsUsernameAvailableResponseEnvelope) XXX_Size() int { return m.Size() } -func (m *GetAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAccountResponse proto.InternalMessageInfo - -func (m *GetAccountResponse) GetId() int64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *GetAccountResponse) GetUsername() string { - if m != nil { - return m.Username - } - return "" +func (m *IsUsernameAvailableResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_IsUsernameAvailableResponseEnvelope.DiscardUnknown(m) } -func (m *GetAccountResponse) GetLocked() bool { - if m != nil { - return m.Locked - } - return false -} +var xxx_messageInfo_IsUsernameAvailableResponseEnvelope proto.InternalMessageInfo -func (m *GetAccountResponse) GetDeleted() bool { +func (m *IsUsernameAvailableResponseEnvelope) GetResult() bool { if m != nil { - return m.Deleted + return m.Result } return false } -type GetAccountResponseEnvelope struct { - Result *GetAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type LoginRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetAccountResponseEnvelope) Reset() { *m = GetAccountResponseEnvelope{} } -func (*GetAccountResponseEnvelope) ProtoMessage() {} -func (*GetAccountResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{5} +func (m *LoginRequest) Reset() { *m = LoginRequest{} } +func (*LoginRequest) ProtoMessage() {} +func (*LoginRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{5} } -func (m *GetAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { +func (m *LoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GetAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GetAccountResponseEnvelope.Marshal(b, m, deterministic) + return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -314,43 +291,49 @@ func (m *GetAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (dst *GetAccountResponseEnvelope) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountResponseEnvelope.Merge(dst, src) +func (dst *LoginRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoginRequest.Merge(dst, src) } -func (m *GetAccountResponseEnvelope) XXX_Size() int { +func (m *LoginRequest) XXX_Size() int { return m.Size() } -func (m *GetAccountResponseEnvelope) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountResponseEnvelope.DiscardUnknown(m) +func (m *LoginRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LoginRequest.DiscardUnknown(m) } -var xxx_messageInfo_GetAccountResponseEnvelope proto.InternalMessageInfo +var xxx_messageInfo_LoginRequest proto.InternalMessageInfo + +func (m *LoginRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} -func (m *GetAccountResponseEnvelope) GetResult() *GetAccountResponse { +func (m *LoginRequest) GetPassword() string { if m != nil { - return m.Result + return m.Password } - return nil + return "" } -type UpdateAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` +type PasswordResetRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *UpdateAccountRequest) Reset() { *m = UpdateAccountRequest{} } -func (*UpdateAccountRequest) ProtoMessage() {} -func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{6} +func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } +func (*PasswordResetRequest) ProtoMessage() {} +func (*PasswordResetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{6} } -func (m *UpdateAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *UpdateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_UpdateAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_PasswordResetRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -360,49 +343,44 @@ func (m *UpdateAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (dst *UpdateAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateAccountRequest.Merge(dst, src) +func (dst *PasswordResetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordResetRequest.Merge(dst, src) } -func (m *UpdateAccountRequest) XXX_Size() int { +func (m *PasswordResetRequest) XXX_Size() int { return m.Size() } -func (m *UpdateAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateAccountRequest.DiscardUnknown(m) +func (m *PasswordResetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordResetRequest.DiscardUnknown(m) } -var xxx_messageInfo_UpdateAccountRequest proto.InternalMessageInfo - -func (m *UpdateAccountRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} +var xxx_messageInfo_PasswordResetRequest proto.InternalMessageInfo -func (m *UpdateAccountRequest) GetUsername() string { +func (m *PasswordResetRequest) GetUsername() string { if m != nil { return m.Username } return "" } -type IsUsernameAvailableRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` +type ChangePasswordRequest struct { + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + CurrentPassword string `protobuf:"bytes,3,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } -func (*IsUsernameAvailableRequest) ProtoMessage() {} -func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{7} +func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } +func (*ChangePasswordRequest) ProtoMessage() {} +func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{7} } -func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { +func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *IsUsernameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_IsUsernameAvailableRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -412,42 +390,57 @@ func (m *IsUsernameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (dst *IsUsernameAvailableRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsUsernameAvailableRequest.Merge(dst, src) +func (dst *ChangePasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangePasswordRequest.Merge(dst, src) } -func (m *IsUsernameAvailableRequest) XXX_Size() int { +func (m *ChangePasswordRequest) XXX_Size() int { return m.Size() } -func (m *IsUsernameAvailableRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IsUsernameAvailableRequest.DiscardUnknown(m) +func (m *ChangePasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m) } -var xxx_messageInfo_IsUsernameAvailableRequest proto.InternalMessageInfo +var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo -func (m *IsUsernameAvailableRequest) GetUsername() string { +func (m *ChangePasswordRequest) GetPassword() string { if m != nil { - return m.Username + return m.Password } return "" } -type IsUsernameAvailableResponseEnvelope struct { - Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result"` +func (m *ChangePasswordRequest) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *ChangePasswordRequest) GetCurrentPassword() string { + if m != nil { + return m.CurrentPassword + } + return "" +} + +type BeginOAuthRequest struct { + ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` + RedirectURI string `protobuf:"bytes,2,opt,name=redirectURI,proto3" json:"redirectURI,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } -func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} -func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{8} +func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } +func (*BeginOAuthRequest) ProtoMessage() {} +func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{8} } -func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { +func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *IsUsernameAvailableResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BeginOAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Marshal(b, m, deterministic) + return xxx_messageInfo_BeginOAuthRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -457,42 +450,49 @@ func (m *IsUsernameAvailableResponseEnvelope) XXX_Marshal(b []byte, deterministi return b[:n], nil } } -func (dst *IsUsernameAvailableResponseEnvelope) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsUsernameAvailableResponseEnvelope.Merge(dst, src) +func (dst *BeginOAuthRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BeginOAuthRequest.Merge(dst, src) } -func (m *IsUsernameAvailableResponseEnvelope) XXX_Size() int { +func (m *BeginOAuthRequest) XXX_Size() int { return m.Size() } -func (m *IsUsernameAvailableResponseEnvelope) XXX_DiscardUnknown() { - xxx_messageInfo_IsUsernameAvailableResponseEnvelope.DiscardUnknown(m) +func (m *BeginOAuthRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BeginOAuthRequest.DiscardUnknown(m) } -var xxx_messageInfo_IsUsernameAvailableResponseEnvelope proto.InternalMessageInfo +var xxx_messageInfo_BeginOAuthRequest proto.InternalMessageInfo -func (m *IsUsernameAvailableResponseEnvelope) GetResult() bool { +func (m *BeginOAuthRequest) GetProviderName() string { if m != nil { - return m.Result + return m.ProviderName } - return false + return "" +} + +func (m *BeginOAuthRequest) GetRedirectURI() string { + if m != nil { + return m.RedirectURI + } + return "" } -type LockAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type BeginOAuthResponse struct { + Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *LockAccountRequest) Reset() { *m = LockAccountRequest{} } -func (*LockAccountRequest) ProtoMessage() {} -func (*LockAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{9} +func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } +func (*BeginOAuthResponse) ProtoMessage() {} +func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{9} } -func (m *LockAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *LockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BeginOAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_LockAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_BeginOAuthResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -502,42 +502,42 @@ func (m *LockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *LockAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LockAccountRequest.Merge(dst, src) +func (dst *BeginOAuthResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BeginOAuthResponse.Merge(dst, src) } -func (m *LockAccountRequest) XXX_Size() int { +func (m *BeginOAuthResponse) XXX_Size() int { return m.Size() } -func (m *LockAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LockAccountRequest.DiscardUnknown(m) +func (m *BeginOAuthResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BeginOAuthResponse.DiscardUnknown(m) } -var xxx_messageInfo_LockAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_BeginOAuthResponse proto.InternalMessageInfo -func (m *LockAccountRequest) GetId() string { +func (m *BeginOAuthResponse) GetProvider() string { if m != nil { - return m.Id + return m.Provider } return "" } -type UnlockAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type OAuthReturnRequest struct { + ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *UnlockAccountRequest) Reset() { *m = UnlockAccountRequest{} } -func (*UnlockAccountRequest) ProtoMessage() {} -func (*UnlockAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{10} +func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } +func (*OAuthReturnRequest) ProtoMessage() {} +func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{10} } -func (m *UnlockAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *UnlockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *OAuthReturnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_UnlockAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_OAuthReturnRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -547,42 +547,42 @@ func (m *UnlockAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (dst *UnlockAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnlockAccountRequest.Merge(dst, src) +func (dst *OAuthReturnRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OAuthReturnRequest.Merge(dst, src) } -func (m *UnlockAccountRequest) XXX_Size() int { +func (m *OAuthReturnRequest) XXX_Size() int { return m.Size() } -func (m *UnlockAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnlockAccountRequest.DiscardUnknown(m) +func (m *OAuthReturnRequest) XXX_DiscardUnknown() { + xxx_messageInfo_OAuthReturnRequest.DiscardUnknown(m) } -var xxx_messageInfo_UnlockAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_OAuthReturnRequest proto.InternalMessageInfo -func (m *UnlockAccountRequest) GetId() string { +func (m *OAuthReturnRequest) GetProviderName() string { if m != nil { - return m.Id + return m.ProviderName } return "" } -type ArchiveAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type OAuthReturnResponse struct { + Redirect string `protobuf:"bytes,1,opt,name=redirect,proto3" json:"redirect,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *ArchiveAccountRequest) Reset() { *m = ArchiveAccountRequest{} } -func (*ArchiveAccountRequest) ProtoMessage() {} -func (*ArchiveAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{11} +func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } +func (*OAuthReturnResponse) ProtoMessage() {} +func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{11} } -func (m *ArchiveAccountRequest) XXX_Unmarshal(b []byte) error { +func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ArchiveAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *OAuthReturnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ArchiveAccountRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_OAuthReturnResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -592,44 +592,47 @@ func (m *ArchiveAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (dst *ArchiveAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArchiveAccountRequest.Merge(dst, src) +func (dst *OAuthReturnResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OAuthReturnResponse.Merge(dst, src) } -func (m *ArchiveAccountRequest) XXX_Size() int { +func (m *OAuthReturnResponse) XXX_Size() int { return m.Size() } -func (m *ArchiveAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ArchiveAccountRequest.DiscardUnknown(m) +func (m *OAuthReturnResponse) XXX_DiscardUnknown() { + xxx_messageInfo_OAuthReturnResponse.DiscardUnknown(m) } -var xxx_messageInfo_ArchiveAccountRequest proto.InternalMessageInfo +var xxx_messageInfo_OAuthReturnResponse proto.InternalMessageInfo -func (m *ArchiveAccountRequest) GetId() string { +func (m *OAuthReturnResponse) GetRedirect() string { if m != nil { - return m.Id + return m.Redirect } return "" } -type ImportAccountRequst struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type Configuration struct { + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + ResponseTypesSupported []string `protobuf:"bytes,2,rep,name=response_types_supported,json=responseTypesSupported" json:"response_types_supported,omitempty"` + SubjectTypesSupported []string `protobuf:"bytes,3,rep,name=subject_types_supported,json=subjectTypesSupported" json:"subject_types_supported,omitempty"` + IdTokenSigningAlgValuesSupported []string `protobuf:"bytes,4,rep,name=id_token_signing_alg_values_supported,json=idTokenSigningAlgValuesSupported" json:"id_token_signing_alg_values_supported,omitempty"` + ClaimsSupported []string `protobuf:"bytes,5,rep,name=claims_supported,json=claimsSupported" json:"claims_supported,omitempty"` + JwksUri string `protobuf:"bytes,6,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ImportAccountRequst) Reset() { *m = ImportAccountRequst{} } -func (*ImportAccountRequst) ProtoMessage() {} -func (*ImportAccountRequst) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{12} +func (m *Configuration) Reset() { *m = Configuration{} } +func (*Configuration) ProtoMessage() {} +func (*Configuration) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{12} } -func (m *ImportAccountRequst) XXX_Unmarshal(b []byte) error { +func (m *Configuration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ImportAccountRequst) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ImportAccountRequst.Marshal(b, m, deterministic) + return xxx_messageInfo_Configuration.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -639,147 +642,79 @@ func (m *ImportAccountRequst) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *ImportAccountRequst) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportAccountRequst.Merge(dst, src) +func (dst *Configuration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Configuration.Merge(dst, src) } -func (m *ImportAccountRequst) XXX_Size() int { +func (m *Configuration) XXX_Size() int { return m.Size() } -func (m *ImportAccountRequst) XXX_DiscardUnknown() { - xxx_messageInfo_ImportAccountRequst.DiscardUnknown(m) +func (m *Configuration) XXX_DiscardUnknown() { + xxx_messageInfo_Configuration.DiscardUnknown(m) } -var xxx_messageInfo_ImportAccountRequst proto.InternalMessageInfo +var xxx_messageInfo_Configuration proto.InternalMessageInfo -func (m *ImportAccountRequst) GetUsername() string { +func (m *Configuration) GetIssuer() string { if m != nil { - return m.Username + return m.Issuer } return "" } -func (m *ImportAccountRequst) GetPassword() string { +func (m *Configuration) GetResponseTypesSupported() []string { if m != nil { - return m.Password + return m.ResponseTypesSupported } - return "" + return nil } -func (m *ImportAccountRequst) GetLocked() bool { +func (m *Configuration) GetSubjectTypesSupported() []string { if m != nil { - return m.Locked - } - return false -} - -type ImportAccountResponse struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ImportAccountResponse) Reset() { *m = ImportAccountResponse{} } -func (*ImportAccountResponse) ProtoMessage() {} -func (*ImportAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{13} -} -func (m *ImportAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil + return m.SubjectTypesSupported } + return nil } -func (dst *ImportAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportAccountResponse.Merge(dst, src) -} -func (m *ImportAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *ImportAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ImportAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ImportAccountResponse proto.InternalMessageInfo -func (m *ImportAccountResponse) GetId() int64 { +func (m *Configuration) GetIdTokenSigningAlgValuesSupported() []string { if m != nil { - return m.Id + return m.IdTokenSigningAlgValuesSupported } - return 0 -} - -type ImportAccountResponseEnvelope struct { - Result *ImportAccountResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + return nil } -func (m *ImportAccountResponseEnvelope) Reset() { *m = ImportAccountResponseEnvelope{} } -func (*ImportAccountResponseEnvelope) ProtoMessage() {} -func (*ImportAccountResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{14} -} -func (m *ImportAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImportAccountResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImportAccountResponseEnvelope.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *Configuration) GetClaimsSupported() []string { + if m != nil { + return m.ClaimsSupported } -} -func (dst *ImportAccountResponseEnvelope) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportAccountResponseEnvelope.Merge(dst, src) -} -func (m *ImportAccountResponseEnvelope) XXX_Size() int { - return m.Size() -} -func (m *ImportAccountResponseEnvelope) XXX_DiscardUnknown() { - xxx_messageInfo_ImportAccountResponseEnvelope.DiscardUnknown(m) + return nil } -var xxx_messageInfo_ImportAccountResponseEnvelope proto.InternalMessageInfo - -func (m *ImportAccountResponseEnvelope) GetResult() *ImportAccountResponse { +func (m *Configuration) GetJwksUri() string { if m != nil { - return m.Result + return m.JwksUri } - return nil + return "" } -type LoginRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` +type HealthCheckResponse struct { + Http bool `protobuf:"varint,1,opt,name=http,proto3" json:"http,omitempty"` + Db bool `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"` + Redis bool `protobuf:"varint,3,opt,name=redis,proto3" json:"redis,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *LoginRequest) Reset() { *m = LoginRequest{} } -func (*LoginRequest) ProtoMessage() {} -func (*LoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{15} +func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } +func (*HealthCheckResponse) ProtoMessage() {} +func (*HealthCheckResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{13} } -func (m *LoginRequest) XXX_Unmarshal(b []byte) error { +func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -789,49 +724,61 @@ func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *LoginRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoginRequest.Merge(dst, src) +func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckResponse.Merge(dst, src) } -func (m *LoginRequest) XXX_Size() int { +func (m *HealthCheckResponse) XXX_Size() int { return m.Size() } -func (m *LoginRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LoginRequest.DiscardUnknown(m) +func (m *HealthCheckResponse) XXX_DiscardUnknown() { + xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m) } -var xxx_messageInfo_LoginRequest proto.InternalMessageInfo +var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo -func (m *LoginRequest) GetUsername() string { +func (m *HealthCheckResponse) GetHttp() bool { if m != nil { - return m.Username + return m.Http } - return "" + return false } -func (m *LoginRequest) GetPassword() string { +func (m *HealthCheckResponse) GetDb() bool { if m != nil { - return m.Password + return m.Db } - return "" + return false } -type PasswordResetRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` +func (m *HealthCheckResponse) GetRedis() bool { + if m != nil { + return m.Redis + } + return false +} + +type Key struct { + Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` + Alg []string `protobuf:"bytes,2,rep,name=alg" json:"alg,omitempty"` + Kty string `protobuf:"bytes,3,opt,name=kty,proto3" json:"kty,omitempty"` + Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` + E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` + N string `protobuf:"bytes,6,opt,name=n,proto3" json:"n,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } -func (*PasswordResetRequest) ProtoMessage() {} -func (*PasswordResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{16} +func (m *Key) Reset() { *m = Key{} } +func (*Key) ProtoMessage() {} +func (*Key) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{14} } -func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { +func (m *Key) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PasswordResetRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_Key.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -841,103 +788,77 @@ func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (dst *PasswordResetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PasswordResetRequest.Merge(dst, src) +func (dst *Key) XXX_Merge(src proto.Message) { + xxx_messageInfo_Key.Merge(dst, src) } -func (m *PasswordResetRequest) XXX_Size() int { +func (m *Key) XXX_Size() int { return m.Size() } -func (m *PasswordResetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PasswordResetRequest.DiscardUnknown(m) +func (m *Key) XXX_DiscardUnknown() { + xxx_messageInfo_Key.DiscardUnknown(m) } -var xxx_messageInfo_PasswordResetRequest proto.InternalMessageInfo +var xxx_messageInfo_Key proto.InternalMessageInfo -func (m *PasswordResetRequest) GetUsername() string { +func (m *Key) GetUse() string { if m != nil { - return m.Username + return m.Use } return "" } -type ChangePasswordRequest struct { - Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - CurrentPassword string `protobuf:"bytes,3,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *Key) GetAlg() []string { + if m != nil { + return m.Alg + } + return nil } -func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } -func (*ChangePasswordRequest) ProtoMessage() {} -func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{17} -} -func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *Key) GetKty() string { + if m != nil { + return m.Kty } -} -func (dst *ChangePasswordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangePasswordRequest.Merge(dst, src) -} -func (m *ChangePasswordRequest) XXX_Size() int { - return m.Size() -} -func (m *ChangePasswordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m) + return "" } -var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo - -func (m *ChangePasswordRequest) GetPassword() string { +func (m *Key) GetKid() string { if m != nil { - return m.Password + return m.Kid } return "" } -func (m *ChangePasswordRequest) GetToken() string { +func (m *Key) GetE() string { if m != nil { - return m.Token + return m.E } return "" } -func (m *ChangePasswordRequest) GetCurrentPassword() string { +func (m *Key) GetN() string { if m != nil { - return m.CurrentPassword + return m.N } return "" } -type ExpirePasswordRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +type JWKSResponse struct { + Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *ExpirePasswordRequest) Reset() { *m = ExpirePasswordRequest{} } -func (*ExpirePasswordRequest) ProtoMessage() {} -func (*ExpirePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{18} +func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } +func (*JWKSResponse) ProtoMessage() {} +func (*JWKSResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_44d0ba90dadea045, []int{15} } -func (m *ExpirePasswordRequest) XXX_Unmarshal(b []byte) error { +func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ExpirePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *JWKSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ExpirePasswordRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_JWKSResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -947,564 +868,306 @@ func (m *ExpirePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (dst *ExpirePasswordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExpirePasswordRequest.Merge(dst, src) +func (dst *JWKSResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JWKSResponse.Merge(dst, src) } -func (m *ExpirePasswordRequest) XXX_Size() int { +func (m *JWKSResponse) XXX_Size() int { return m.Size() } -func (m *ExpirePasswordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExpirePasswordRequest.DiscardUnknown(m) +func (m *JWKSResponse) XXX_DiscardUnknown() { + xxx_messageInfo_JWKSResponse.DiscardUnknown(m) } -var xxx_messageInfo_ExpirePasswordRequest proto.InternalMessageInfo +var xxx_messageInfo_JWKSResponse proto.InternalMessageInfo -func (m *ExpirePasswordRequest) GetId() string { +func (m *JWKSResponse) GetKeys() []*Key { if m != nil { - return m.Id + return m.Keys } - return "" + return nil } -type BeginOAuthRequest struct { - ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` - RedirectURI string `protobuf:"bytes,2,opt,name=redirectURI,proto3" json:"redirectURI,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +func init() { + proto.RegisterType((*SignupRequest)(nil), "grpc.SignupRequest") + proto.RegisterType((*SignupResponse)(nil), "grpc.SignupResponse") + proto.RegisterType((*SignupResponseEnvelope)(nil), "grpc.SignupResponseEnvelope") + proto.RegisterType((*IsUsernameAvailableRequest)(nil), "grpc.IsUsernameAvailableRequest") + proto.RegisterType((*IsUsernameAvailableResponseEnvelope)(nil), "grpc.IsUsernameAvailableResponseEnvelope") + proto.RegisterType((*LoginRequest)(nil), "grpc.LoginRequest") + proto.RegisterType((*PasswordResetRequest)(nil), "grpc.PasswordResetRequest") + proto.RegisterType((*ChangePasswordRequest)(nil), "grpc.ChangePasswordRequest") + proto.RegisterType((*BeginOAuthRequest)(nil), "grpc.BeginOAuthRequest") + proto.RegisterType((*BeginOAuthResponse)(nil), "grpc.BeginOAuthResponse") + proto.RegisterType((*OAuthReturnRequest)(nil), "grpc.OAuthReturnRequest") + proto.RegisterType((*OAuthReturnResponse)(nil), "grpc.OAuthReturnResponse") + proto.RegisterType((*Configuration)(nil), "grpc.Configuration") + proto.RegisterType((*HealthCheckResponse)(nil), "grpc.HealthCheckResponse") + proto.RegisterType((*Key)(nil), "grpc.Key") + proto.RegisterType((*JWKSResponse)(nil), "grpc.JWKSResponse") } +func (this *SignupRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } -func (*BeginOAuthRequest) ProtoMessage() {} -func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{19} -} -func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeginOAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeginOAuthRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*SignupRequest) + if !ok { + that2, ok := that.(SignupRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *BeginOAuthRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeginOAuthRequest.Merge(dst, src) -} -func (m *BeginOAuthRequest) XXX_Size() int { - return m.Size() -} -func (m *BeginOAuthRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BeginOAuthRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BeginOAuthRequest proto.InternalMessageInfo - -func (m *BeginOAuthRequest) GetProviderName() string { - if m != nil { - return m.ProviderName + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -func (m *BeginOAuthRequest) GetRedirectURI() string { - if m != nil { - return m.RedirectURI + if this.Username != that1.Username { + return false } - return "" -} - -type BeginOAuthResponse struct { - Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + if this.Password != that1.Password { + return false + } + return true } +func (this *SignupResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } -func (*BeginOAuthResponse) ProtoMessage() {} -func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{20} -} -func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BeginOAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BeginOAuthResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*SignupResponse) + if !ok { + that2, ok := that.(SignupResponse) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *BeginOAuthResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeginOAuthResponse.Merge(dst, src) -} -func (m *BeginOAuthResponse) XXX_Size() int { - return m.Size() -} -func (m *BeginOAuthResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BeginOAuthResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BeginOAuthResponse proto.InternalMessageInfo - -func (m *BeginOAuthResponse) GetProvider() string { - if m != nil { - return m.Provider + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -type OAuthReturnRequest struct { - ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + if this.IdToken != that1.IdToken { + return false + } + return true } +func (this *SignupResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } -func (*OAuthReturnRequest) ProtoMessage() {} -func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{21} -} -func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OAuthReturnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OAuthReturnRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*SignupResponseEnvelope) + if !ok { + that2, ok := that.(SignupResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *OAuthReturnRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OAuthReturnRequest.Merge(dst, src) -} -func (m *OAuthReturnRequest) XXX_Size() int { - return m.Size() -} -func (m *OAuthReturnRequest) XXX_DiscardUnknown() { - xxx_messageInfo_OAuthReturnRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_OAuthReturnRequest proto.InternalMessageInfo - -func (m *OAuthReturnRequest) GetProviderName() string { - if m != nil { - return m.ProviderName + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -type OAuthReturnResponse struct { - Redirect string `protobuf:"bytes,1,opt,name=redirect,proto3" json:"redirect,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + if !this.Result.Equal(that1.Result) { + return false + } + return true } +func (this *IsUsernameAvailableRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } -func (*OAuthReturnResponse) ProtoMessage() {} -func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{22} -} -func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OAuthReturnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OAuthReturnResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*IsUsernameAvailableRequest) + if !ok { + that2, ok := that.(IsUsernameAvailableRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + return true } -func (dst *OAuthReturnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OAuthReturnResponse.Merge(dst, src) -} -func (m *OAuthReturnResponse) XXX_Size() int { - return m.Size() -} -func (m *OAuthReturnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_OAuthReturnResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_OAuthReturnResponse proto.InternalMessageInfo +func (this *IsUsernameAvailableResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *OAuthReturnResponse) GetRedirect() string { - if m != nil { - return m.Redirect + that1, ok := that.(*IsUsernameAvailableResponseEnvelope) + if !ok { + that2, ok := that.(IsUsernameAvailableResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } } - return "" + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Result != that1.Result { + return false + } + return true } +func (this *LoginRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -type Configuration struct { - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - ResponseTypesSupported []string `protobuf:"bytes,2,rep,name=response_types_supported,json=responseTypesSupported" json:"response_types_supported,omitempty"` - SubjectTypesSupported []string `protobuf:"bytes,3,rep,name=subject_types_supported,json=subjectTypesSupported" json:"subject_types_supported,omitempty"` - IdTokenSigningAlgValuesSupported []string `protobuf:"bytes,4,rep,name=id_token_signing_alg_values_supported,json=idTokenSigningAlgValuesSupported" json:"id_token_signing_alg_values_supported,omitempty"` - ClaimsSupported []string `protobuf:"bytes,5,rep,name=claims_supported,json=claimsSupported" json:"claims_supported,omitempty"` - JwksUri string `protobuf:"bytes,6,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Configuration) Reset() { *m = Configuration{} } -func (*Configuration) ProtoMessage() {} -func (*Configuration) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{23} -} -func (m *Configuration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Configuration.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*LoginRequest) + if !ok { + that2, ok := that.(LoginRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *Configuration) XXX_Merge(src proto.Message) { - xxx_messageInfo_Configuration.Merge(dst, src) -} -func (m *Configuration) XXX_Size() int { - return m.Size() -} -func (m *Configuration) XXX_DiscardUnknown() { - xxx_messageInfo_Configuration.DiscardUnknown(m) -} - -var xxx_messageInfo_Configuration proto.InternalMessageInfo - -func (m *Configuration) GetIssuer() string { - if m != nil { - return m.Issuer + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -func (m *Configuration) GetResponseTypesSupported() []string { - if m != nil { - return m.ResponseTypesSupported + if this.Username != that1.Username { + return false } - return nil -} - -func (m *Configuration) GetSubjectTypesSupported() []string { - if m != nil { - return m.SubjectTypesSupported + if this.Password != that1.Password { + return false } - return nil + return true } - -func (m *Configuration) GetIdTokenSigningAlgValuesSupported() []string { - if m != nil { - return m.IdTokenSigningAlgValuesSupported +func (this *PasswordResetRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return nil -} -func (m *Configuration) GetClaimsSupported() []string { - if m != nil { - return m.ClaimsSupported + that1, ok := that.(*PasswordResetRequest) + if !ok { + that2, ok := that.(PasswordResetRequest) + if ok { + that1 = &that2 + } else { + return false + } } - return nil -} - -func (m *Configuration) GetJwksUri() string { - if m != nil { - return m.JwksUri + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return "" -} - -type ServiceStatsResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + if this.Username != that1.Username { + return false + } + return true } +func (this *ChangePasswordRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *ServiceStatsResponse) Reset() { *m = ServiceStatsResponse{} } -func (*ServiceStatsResponse) ProtoMessage() {} -func (*ServiceStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{24} -} -func (m *ServiceStatsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceStatsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*ChangePasswordRequest) + if !ok { + that2, ok := that.(ChangePasswordRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Password != that1.Password { + return false + } + if this.Token != that1.Token { + return false + } + if this.CurrentPassword != that1.CurrentPassword { + return false + } + return true } -func (dst *ServiceStatsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceStatsResponse.Merge(dst, src) -} -func (m *ServiceStatsResponse) XXX_Size() int { - return m.Size() -} -func (m *ServiceStatsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceStatsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceStatsResponse proto.InternalMessageInfo - -type HealthCheckResponse struct { - Http bool `protobuf:"varint,1,opt,name=http,proto3" json:"http,omitempty"` - Db bool `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"` - Redis bool `protobuf:"varint,3,opt,name=redis,proto3" json:"redis,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} +func (this *BeginOAuthRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } -func (*HealthCheckResponse) ProtoMessage() {} -func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{25} -} -func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err + that1, ok := that.(*BeginOAuthRequest) + if !ok { + that2, ok := that.(BeginOAuthRequest) + if ok { + that1 = &that2 + } else { + return false } - return b[:n], nil } -} -func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HealthCheckResponse.Merge(dst, src) -} -func (m *HealthCheckResponse) XXX_Size() int { - return m.Size() -} -func (m *HealthCheckResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo - -func (m *HealthCheckResponse) GetHttp() bool { - if m != nil { - return m.Http + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return false -} - -func (m *HealthCheckResponse) GetDb() bool { - if m != nil { - return m.Db + if this.ProviderName != that1.ProviderName { + return false } - return false -} - -func (m *HealthCheckResponse) GetRedis() bool { - if m != nil { - return m.Redis + if this.RedirectURI != that1.RedirectURI { + return false } - return false + return true } +func (this *BeginOAuthResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -type Key struct { - Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` - Alg []string `protobuf:"bytes,2,rep,name=alg" json:"alg,omitempty"` - Kty string `protobuf:"bytes,3,opt,name=kty,proto3" json:"kty,omitempty"` - Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` - E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` - N string `protobuf:"bytes,6,opt,name=n,proto3" json:"n,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + that1, ok := that.(*BeginOAuthResponse) + if !ok { + that2, ok := that.(BeginOAuthResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Provider != that1.Provider { + return false + } + return true } +func (this *OAuthReturnRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *Key) Reset() { *m = Key{} } -func (*Key) ProtoMessage() {} -func (*Key) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{26} -} -func (m *Key) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Key.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *Key) XXX_Merge(src proto.Message) { - xxx_messageInfo_Key.Merge(dst, src) -} -func (m *Key) XXX_Size() int { - return m.Size() -} -func (m *Key) XXX_DiscardUnknown() { - xxx_messageInfo_Key.DiscardUnknown(m) -} - -var xxx_messageInfo_Key proto.InternalMessageInfo - -func (m *Key) GetUse() string { - if m != nil { - return m.Use - } - return "" -} - -func (m *Key) GetAlg() []string { - if m != nil { - return m.Alg - } - return nil -} - -func (m *Key) GetKty() string { - if m != nil { - return m.Kty - } - return "" -} - -func (m *Key) GetKid() string { - if m != nil { - return m.Kid - } - return "" -} - -func (m *Key) GetE() string { - if m != nil { - return m.E - } - return "" -} - -func (m *Key) GetN() string { - if m != nil { - return m.N - } - return "" -} - -type JWKSResponse struct { - Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } -func (*JWKSResponse) ProtoMessage() {} -func (*JWKSResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_975e18bf4e534da8, []int{27} -} -func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *JWKSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_JWKSResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (dst *JWKSResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JWKSResponse.Merge(dst, src) -} -func (m *JWKSResponse) XXX_Size() int { - return m.Size() -} -func (m *JWKSResponse) XXX_DiscardUnknown() { - xxx_messageInfo_JWKSResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_JWKSResponse proto.InternalMessageInfo - -func (m *JWKSResponse) GetKeys() []*Key { - if m != nil { - return m.Keys - } - return nil -} - -func init() { - proto.RegisterType((*SignupRequest)(nil), "grpc.SignupRequest") - proto.RegisterType((*SignupResponse)(nil), "grpc.SignupResponse") - proto.RegisterType((*SignupResponseEnvelope)(nil), "grpc.SignupResponseEnvelope") - proto.RegisterType((*GetAccountRequest)(nil), "grpc.GetAccountRequest") - proto.RegisterType((*GetAccountResponse)(nil), "grpc.GetAccountResponse") - proto.RegisterType((*GetAccountResponseEnvelope)(nil), "grpc.GetAccountResponseEnvelope") - proto.RegisterType((*UpdateAccountRequest)(nil), "grpc.UpdateAccountRequest") - proto.RegisterType((*IsUsernameAvailableRequest)(nil), "grpc.IsUsernameAvailableRequest") - proto.RegisterType((*IsUsernameAvailableResponseEnvelope)(nil), "grpc.IsUsernameAvailableResponseEnvelope") - proto.RegisterType((*LockAccountRequest)(nil), "grpc.LockAccountRequest") - proto.RegisterType((*UnlockAccountRequest)(nil), "grpc.UnlockAccountRequest") - proto.RegisterType((*ArchiveAccountRequest)(nil), "grpc.ArchiveAccountRequest") - proto.RegisterType((*ImportAccountRequst)(nil), "grpc.ImportAccountRequst") - proto.RegisterType((*ImportAccountResponse)(nil), "grpc.ImportAccountResponse") - proto.RegisterType((*ImportAccountResponseEnvelope)(nil), "grpc.ImportAccountResponseEnvelope") - proto.RegisterType((*LoginRequest)(nil), "grpc.LoginRequest") - proto.RegisterType((*PasswordResetRequest)(nil), "grpc.PasswordResetRequest") - proto.RegisterType((*ChangePasswordRequest)(nil), "grpc.ChangePasswordRequest") - proto.RegisterType((*ExpirePasswordRequest)(nil), "grpc.ExpirePasswordRequest") - proto.RegisterType((*BeginOAuthRequest)(nil), "grpc.BeginOAuthRequest") - proto.RegisterType((*BeginOAuthResponse)(nil), "grpc.BeginOAuthResponse") - proto.RegisterType((*OAuthReturnRequest)(nil), "grpc.OAuthReturnRequest") - proto.RegisterType((*OAuthReturnResponse)(nil), "grpc.OAuthReturnResponse") - proto.RegisterType((*Configuration)(nil), "grpc.Configuration") - proto.RegisterType((*ServiceStatsResponse)(nil), "grpc.ServiceStatsResponse") - proto.RegisterType((*HealthCheckResponse)(nil), "grpc.HealthCheckResponse") - proto.RegisterType((*Key)(nil), "grpc.Key") - proto.RegisterType((*JWKSResponse)(nil), "grpc.JWKSResponse") -} -func (this *SignupRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SignupRequest) + that1, ok := that.(*OAuthReturnRequest) if !ok { - that2, ok := that.(SignupRequest) + that2, ok := that.(OAuthReturnRequest) if ok { that1 = &that2 } else { @@ -1516,22 +1179,19 @@ func (this *SignupRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Username != that1.Username { - return false - } - if this.Password != that1.Password { + if this.ProviderName != that1.ProviderName { return false } return true } -func (this *SignupResponse) Equal(that interface{}) bool { +func (this *OAuthReturnResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SignupResponse) + that1, ok := that.(*OAuthReturnResponse) if !ok { - that2, ok := that.(SignupResponse) + that2, ok := that.(OAuthReturnResponse) if ok { that1 = &that2 } else { @@ -1543,19 +1203,19 @@ func (this *SignupResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if this.IdToken != that1.IdToken { + if this.Redirect != that1.Redirect { return false } return true } -func (this *SignupResponseEnvelope) Equal(that interface{}) bool { +func (this *Configuration) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SignupResponseEnvelope) + that1, ok := that.(*Configuration) if !ok { - that2, ok := that.(SignupResponseEnvelope) + that2, ok := that.(Configuration) if ok { that1 = &that2 } else { @@ -1567,43 +1227,54 @@ func (this *SignupResponseEnvelope) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.Result.Equal(that1.Result) { + if this.Issuer != that1.Issuer { return false } - return true -} -func (this *GetAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + if len(this.ResponseTypesSupported) != len(that1.ResponseTypesSupported) { + return false } - - that1, ok := that.(*GetAccountRequest) - if !ok { - that2, ok := that.(GetAccountRequest) - if ok { - that1 = &that2 - } else { + for i := range this.ResponseTypesSupported { + if this.ResponseTypesSupported[i] != that1.ResponseTypesSupported[i] { return false } } - if that1 == nil { - return this == nil - } else if this == nil { + if len(this.SubjectTypesSupported) != len(that1.SubjectTypesSupported) { + return false + } + for i := range this.SubjectTypesSupported { + if this.SubjectTypesSupported[i] != that1.SubjectTypesSupported[i] { + return false + } + } + if len(this.IdTokenSigningAlgValuesSupported) != len(that1.IdTokenSigningAlgValuesSupported) { + return false + } + for i := range this.IdTokenSigningAlgValuesSupported { + if this.IdTokenSigningAlgValuesSupported[i] != that1.IdTokenSigningAlgValuesSupported[i] { + return false + } + } + if len(this.ClaimsSupported) != len(that1.ClaimsSupported) { return false } - if this.Id != that1.Id { + for i := range this.ClaimsSupported { + if this.ClaimsSupported[i] != that1.ClaimsSupported[i] { + return false + } + } + if this.JwksUri != that1.JwksUri { return false } return true } -func (this *GetAccountResponse) Equal(that interface{}) bool { +func (this *HealthCheckResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*GetAccountResponse) + that1, ok := that.(*HealthCheckResponse) if !ok { - that2, ok := that.(GetAccountResponse) + that2, ok := that.(HealthCheckResponse) if ok { that1 = &that2 } else { @@ -1615,28 +1286,25 @@ func (this *GetAccountResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Id != that1.Id { - return false - } - if this.Username != that1.Username { + if this.Http != that1.Http { return false } - if this.Locked != that1.Locked { + if this.Db != that1.Db { return false } - if this.Deleted != that1.Deleted { + if this.Redis != that1.Redis { return false } return true } -func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { +func (this *Key) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*GetAccountResponseEnvelope) + that1, ok := that.(*Key) if !ok { - that2, ok := that.(GetAccountResponseEnvelope) + that2, ok := that.(Key) if ok { that1 = &that2 } else { @@ -1648,46 +1316,39 @@ func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.Result.Equal(that1.Result) { + if this.Use != that1.Use { return false } - return true -} -func (this *UpdateAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + if len(this.Alg) != len(that1.Alg) { + return false } - - that1, ok := that.(*UpdateAccountRequest) - if !ok { - that2, ok := that.(UpdateAccountRequest) - if ok { - that1 = &that2 - } else { + for i := range this.Alg { + if this.Alg[i] != that1.Alg[i] { return false } } - if that1 == nil { - return this == nil - } else if this == nil { + if this.Kty != that1.Kty { + return false + } + if this.Kid != that1.Kid { return false } - if this.Id != that1.Id { + if this.E != that1.E { return false } - if this.Username != that1.Username { + if this.N != that1.N { return false } return true } -func (this *IsUsernameAvailableRequest) Equal(that interface{}) bool { +func (this *JWKSResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*IsUsernameAvailableRequest) + that1, ok := that.(*JWKSResponse) if !ok { - that2, ok := that.(IsUsernameAvailableRequest) + that2, ok := that.(JWKSResponse) if ok { that1 = &that2 } else { @@ -1699,4047 +1360,1642 @@ func (this *IsUsernameAvailableRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Username != that1.Username { + if len(this.Keys) != len(that1.Keys) { return false } + for i := range this.Keys { + if !this.Keys[i].Equal(that1.Keys[i]) { + return false + } + } return true } -func (this *IsUsernameAvailableResponseEnvelope) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*IsUsernameAvailableResponseEnvelope) - if !ok { - that2, ok := that.(IsUsernameAvailableResponseEnvelope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Result != that1.Result { - return false +func (this *SignupRequest) GoString() string { + if this == nil { + return "nil" } - return true + s := make([]string, 0, 6) + s = append(s, "&grpc.SignupRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *LockAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*LockAccountRequest) - if !ok { - that2, ok := that.(LockAccountRequest) - if ok { - that1 = &that2 - } else { - return false - } +func (this *SignupResponse) GoString() string { + if this == nil { + return "nil" } - if that1 == nil { - return this == nil - } else if this == nil { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.SignupResponse{") + s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SignupResponseEnvelope) GoString() string { + if this == nil { + return "nil" } - if this.Id != that1.Id { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.SignupResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") } - return true + s = append(s, "}") + return strings.Join(s, "") } -func (this *UnlockAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (this *IsUsernameAvailableRequest) GoString() string { + if this == nil { + return "nil" } - - that1, ok := that.(*UnlockAccountRequest) - if !ok { - that2, ok := that.(UnlockAccountRequest) - if ok { - that1 = &that2 - } else { - return false - } + s := make([]string, 0, 5) + s = append(s, "&grpc.IsUsernameAvailableRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *IsUsernameAvailableResponseEnvelope) GoString() string { + if this == nil { + return "nil" } - if that1 == nil { - return this == nil - } else if this == nil { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.IsUsernameAvailableResponseEnvelope{") + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LoginRequest) GoString() string { + if this == nil { + return "nil" } - if this.Id != that1.Id { - return false + s := make([]string, 0, 6) + s = append(s, "&grpc.LoginRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *PasswordResetRequest) GoString() string { + if this == nil { + return "nil" } - return true + s := make([]string, 0, 5) + s = append(s, "&grpc.PasswordResetRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *ArchiveAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (this *ChangePasswordRequest) GoString() string { + if this == nil { + return "nil" } - - that1, ok := that.(*ArchiveAccountRequest) - if !ok { - that2, ok := that.(ArchiveAccountRequest) - if ok { - that1 = &that2 - } else { - return false - } + s := make([]string, 0, 7) + s = append(s, "&grpc.ChangePasswordRequest{") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "Token: "+fmt.Sprintf("%#v", this.Token)+",\n") + s = append(s, "CurrentPassword: "+fmt.Sprintf("%#v", this.CurrentPassword)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BeginOAuthRequest) GoString() string { + if this == nil { + return "nil" } - if that1 == nil { - return this == nil - } else if this == nil { - return false + s := make([]string, 0, 6) + s = append(s, "&grpc.BeginOAuthRequest{") + s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") + s = append(s, "RedirectURI: "+fmt.Sprintf("%#v", this.RedirectURI)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BeginOAuthResponse) GoString() string { + if this == nil { + return "nil" } - if this.Id != that1.Id { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.BeginOAuthResponse{") + s = append(s, "Provider: "+fmt.Sprintf("%#v", this.Provider)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OAuthReturnRequest) GoString() string { + if this == nil { + return "nil" } - return true + s := make([]string, 0, 5) + s = append(s, "&grpc.OAuthReturnRequest{") + s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *ImportAccountRequst) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (this *OAuthReturnResponse) GoString() string { + if this == nil { + return "nil" } - - that1, ok := that.(*ImportAccountRequst) - if !ok { - that2, ok := that.(ImportAccountRequst) - if ok { - that1 = &that2 - } else { - return false - } + s := make([]string, 0, 5) + s = append(s, "&grpc.OAuthReturnResponse{") + s = append(s, "Redirect: "+fmt.Sprintf("%#v", this.Redirect)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Configuration) GoString() string { + if this == nil { + return "nil" } - if that1 == nil { - return this == nil - } else if this == nil { - return false + s := make([]string, 0, 10) + s = append(s, "&grpc.Configuration{") + s = append(s, "Issuer: "+fmt.Sprintf("%#v", this.Issuer)+",\n") + s = append(s, "ResponseTypesSupported: "+fmt.Sprintf("%#v", this.ResponseTypesSupported)+",\n") + s = append(s, "SubjectTypesSupported: "+fmt.Sprintf("%#v", this.SubjectTypesSupported)+",\n") + s = append(s, "IdTokenSigningAlgValuesSupported: "+fmt.Sprintf("%#v", this.IdTokenSigningAlgValuesSupported)+",\n") + s = append(s, "ClaimsSupported: "+fmt.Sprintf("%#v", this.ClaimsSupported)+",\n") + s = append(s, "JwksUri: "+fmt.Sprintf("%#v", this.JwksUri)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *HealthCheckResponse) GoString() string { + if this == nil { + return "nil" } - if this.Username != that1.Username { - return false + s := make([]string, 0, 7) + s = append(s, "&grpc.HealthCheckResponse{") + s = append(s, "Http: "+fmt.Sprintf("%#v", this.Http)+",\n") + s = append(s, "Db: "+fmt.Sprintf("%#v", this.Db)+",\n") + s = append(s, "Redis: "+fmt.Sprintf("%#v", this.Redis)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Key) GoString() string { + if this == nil { + return "nil" } - if this.Password != that1.Password { - return false + s := make([]string, 0, 10) + s = append(s, "&grpc.Key{") + s = append(s, "Use: "+fmt.Sprintf("%#v", this.Use)+",\n") + s = append(s, "Alg: "+fmt.Sprintf("%#v", this.Alg)+",\n") + s = append(s, "Kty: "+fmt.Sprintf("%#v", this.Kty)+",\n") + s = append(s, "Kid: "+fmt.Sprintf("%#v", this.Kid)+",\n") + s = append(s, "E: "+fmt.Sprintf("%#v", this.E)+",\n") + s = append(s, "N: "+fmt.Sprintf("%#v", this.N)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *JWKSResponse) GoString() string { + if this == nil { + return "nil" } - if this.Locked != that1.Locked { - return false + s := make([]string, 0, 5) + s = append(s, "&grpc.JWKSResponse{") + if this.Keys != nil { + s = append(s, "Keys: "+fmt.Sprintf("%#v", this.Keys)+",\n") } - return true + s = append(s, "}") + return strings.Join(s, "") } -func (this *ImportAccountResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil +func valueToGoStringAuthn(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} - that1, ok := that.(*ImportAccountResponse) - if !ok { - that2, ok := that.(ImportAccountResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// PublicAuthNClient is the client API for PublicAuthN service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PublicAuthNClient interface { + Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) + IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) + Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) + RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) + Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) + RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) + ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) + BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) + OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) + ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) + JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) + HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) +} + +type publicAuthNClient struct { + cc *grpc.ClientConn +} + +func NewPublicAuthNClient(cc *grpc.ClientConn) PublicAuthNClient { + return &publicAuthNClient{cc} +} + +func (c *publicAuthNClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { + out := new(SignupResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Signup", in, out, opts...) + if err != nil { + return nil, err } - if this.Id != that1.Id { - return false + return out, nil +} + +func (c *publicAuthNClient) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) { + out := new(IsUsernameAvailableResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/IsUsernameAvailable", in, out, opts...) + if err != nil { + return nil, err } - return true + return out, nil } -func (this *ImportAccountResponseEnvelope) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (c *publicAuthNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Login", in, out, opts...) + if err != nil { + return nil, err } + return out, nil +} - that1, ok := that.(*ImportAccountResponseEnvelope) - if !ok { - that2, ok := that.(ImportAccountResponseEnvelope) - if ok { - that1 = &that2 - } else { - return false - } +func (c *publicAuthNClient) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RefreshSession", in, out, opts...) + if err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + return out, nil +} + +func (c *publicAuthNClient) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Logout", in, out, opts...) + if err != nil { + return nil, err } - if !this.Result.Equal(that1.Result) { - return false + return out, nil +} + +func (c *publicAuthNClient) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RequestPasswordReset", in, out, opts...) + if err != nil { + return nil, err } - return true + return out, nil } -func (this *LoginRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (c *publicAuthNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) { + out := new(SignupResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/ChangePassword", in, out, opts...) + if err != nil { + return nil, err } + return out, nil +} - that1, ok := that.(*LoginRequest) - if !ok { - that2, ok := that.(LoginRequest) - if ok { - that1 = &that2 - } else { - return false - } +func (c *publicAuthNClient) BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) { + out := new(BeginOAuthResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/BeginOAuth", in, out, opts...) + if err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + return out, nil +} + +func (c *publicAuthNClient) OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) { + out := new(OAuthReturnResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/OAuthReturn", in, out, opts...) + if err != nil { + return nil, err } - if this.Username != that1.Username { - return false + return out, nil +} + +func (c *publicAuthNClient) ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) { + out := new(Configuration) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/ServiceConfiguration", in, out, opts...) + if err != nil { + return nil, err } - if this.Password != that1.Password { - return false + return out, nil +} + +func (c *publicAuthNClient) JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) { + out := new(JWKSResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/JWKS", in, out, opts...) + if err != nil { + return nil, err } - return true + return out, nil } -func (this *PasswordResetRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (c *publicAuthNClient) HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { + out := new(HealthCheckResponse) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/HealthCheck", in, out, opts...) + if err != nil { + return nil, err } + return out, nil +} - that1, ok := that.(*PasswordResetRequest) - if !ok { - that2, ok := that.(PasswordResetRequest) - if ok { - that1 = &that2 - } else { - return false - } +// PublicAuthNServer is the server API for PublicAuthN service. +type PublicAuthNServer interface { + Signup(context.Context, *SignupRequest) (*SignupResponseEnvelope, error) + IsUsernameAvailable(context.Context, *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) + Login(context.Context, *LoginRequest) (*SignupResponse, error) + RefreshSession(context.Context, *types.Empty) (*SignupResponse, error) + Logout(context.Context, *types.Empty) (*types.Empty, error) + RequestPasswordReset(context.Context, *PasswordResetRequest) (*types.Empty, error) + ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponse, error) + BeginOAuth(context.Context, *BeginOAuthRequest) (*BeginOAuthResponse, error) + OAuthReturn(context.Context, *OAuthReturnRequest) (*OAuthReturnResponse, error) + ServiceConfiguration(context.Context, *types.Empty) (*Configuration, error) + JWKS(context.Context, *types.Empty) (*JWKSResponse, error) + HealthCheck(context.Context, *types.Empty) (*HealthCheckResponse, error) +} + +func RegisterPublicAuthNServer(s *grpc.Server, srv PublicAuthNServer) { + s.RegisterService(&_PublicAuthN_serviceDesc, srv) +} + +func _PublicAuthN_Signup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignupRequest) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).Signup(ctx, in) } - if this.Username != that1.Username { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/Signup", } - return true -} -func (this *ChangePasswordRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).Signup(ctx, req.(*SignupRequest)) } + return interceptor(ctx, in, info, handler) +} - that1, ok := that.(*ChangePasswordRequest) - if !ok { - that2, ok := that.(ChangePasswordRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false +func _PublicAuthN_IsUsernameAvailable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsUsernameAvailableRequest) + if err := dec(in); err != nil { + return nil, err } - if this.Password != that1.Password { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).IsUsernameAvailable(ctx, in) } - if this.Token != that1.Token { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/IsUsernameAvailable", } - if this.CurrentPassword != that1.CurrentPassword { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).IsUsernameAvailable(ctx, req.(*IsUsernameAvailableRequest)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *ExpirePasswordRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*ExpirePasswordRequest) - if !ok { - that2, ok := that.(ExpirePasswordRequest) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoginRequest) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).Login(ctx, in) } - if this.Id != that1.Id { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/Login", } - return true -} -func (this *BeginOAuthRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).Login(ctx, req.(*LoginRequest)) } + return interceptor(ctx, in, info, handler) +} - that1, ok := that.(*BeginOAuthRequest) - if !ok { - that2, ok := that.(BeginOAuthRequest) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_RefreshSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).RefreshSession(ctx, in) } - if this.ProviderName != that1.ProviderName { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/RefreshSession", } - if this.RedirectURI != that1.RedirectURI { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).RefreshSession(ctx, req.(*types.Empty)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *BeginOAuthResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*BeginOAuthResponse) - if !ok { - that2, ok := that.(BeginOAuthResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Provider != that1.Provider { - return false - } - return true -} -func (this *OAuthReturnRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func _PublicAuthN_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - - that1, ok := that.(*OAuthReturnRequest) - if !ok { - that2, ok := that.(OAuthReturnRequest) - if ok { - that1 = &that2 - } else { - return false - } + if interceptor == nil { + return srv.(PublicAuthNServer).Logout(ctx, in) } - if that1 == nil { - return this == nil - } else if this == nil { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/Logout", } - if this.ProviderName != that1.ProviderName { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).Logout(ctx, req.(*types.Empty)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *OAuthReturnResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*OAuthReturnResponse) - if !ok { - that2, ok := that.(OAuthReturnResponse) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_RequestPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PasswordResetRequest) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).RequestPasswordReset(ctx, in) } - if this.Redirect != that1.Redirect { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/RequestPasswordReset", } - return true -} -func (this *Configuration) Equal(that interface{}) bool { - if that == nil { - return this == nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).RequestPasswordReset(ctx, req.(*PasswordResetRequest)) } + return interceptor(ctx, in, info, handler) +} - that1, ok := that.(*Configuration) - if !ok { - that2, ok := that.(Configuration) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangePasswordRequest) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).ChangePassword(ctx, in) } - if this.Issuer != that1.Issuer { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/ChangePassword", } - if len(this.ResponseTypesSupported) != len(that1.ResponseTypesSupported) { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) } - for i := range this.ResponseTypesSupported { - if this.ResponseTypesSupported[i] != that1.ResponseTypesSupported[i] { - return false - } + return interceptor(ctx, in, info, handler) +} + +func _PublicAuthN_BeginOAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BeginOAuthRequest) + if err := dec(in); err != nil { + return nil, err } - if len(this.SubjectTypesSupported) != len(that1.SubjectTypesSupported) { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).BeginOAuth(ctx, in) } - for i := range this.SubjectTypesSupported { - if this.SubjectTypesSupported[i] != that1.SubjectTypesSupported[i] { - return false - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/BeginOAuth", } - if len(this.IdTokenSigningAlgValuesSupported) != len(that1.IdTokenSigningAlgValuesSupported) { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).BeginOAuth(ctx, req.(*BeginOAuthRequest)) } - for i := range this.IdTokenSigningAlgValuesSupported { - if this.IdTokenSigningAlgValuesSupported[i] != that1.IdTokenSigningAlgValuesSupported[i] { - return false - } + return interceptor(ctx, in, info, handler) +} + +func _PublicAuthN_OAuthReturn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OAuthReturnRequest) + if err := dec(in); err != nil { + return nil, err } - if len(this.ClaimsSupported) != len(that1.ClaimsSupported) { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).OAuthReturn(ctx, in) } - for i := range this.ClaimsSupported { - if this.ClaimsSupported[i] != that1.ClaimsSupported[i] { - return false - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/OAuthReturn", } - if this.JwksUri != that1.JwksUri { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).OAuthReturn(ctx, req.(*OAuthReturnRequest)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *ServiceStatsResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*ServiceStatsResponse) - if !ok { - that2, ok := that.(ServiceStatsResponse) - if ok { - that1 = &that2 - } else { - return false - } +func _PublicAuthN_ServiceConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - if that1 == nil { - return this == nil - } else if this == nil { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).ServiceConfiguration(ctx, in) } - return true -} -func (this *HealthCheckResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/ServiceConfiguration", } - - that1, ok := that.(*HealthCheckResponse) - if !ok { - that2, ok := that.(HealthCheckResponse) - if ok { - that1 = &that2 - } else { - return false - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).ServiceConfiguration(ctx, req.(*types.Empty)) } - if that1 == nil { - return this == nil - } else if this == nil { - return false + return interceptor(ctx, in, info, handler) +} + +func _PublicAuthN_JWKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - if this.Http != that1.Http { - return false + if interceptor == nil { + return srv.(PublicAuthNServer).JWKS(ctx, in) } - if this.Db != that1.Db { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/JWKS", } - if this.Redis != that1.Redis { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).JWKS(ctx, req.(*types.Empty)) } - return true + return interceptor(ctx, in, info, handler) } -func (this *Key) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*Key) - if !ok { - that2, ok := that.(Key) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Use != that1.Use { - return false - } - if len(this.Alg) != len(that1.Alg) { - return false +func _PublicAuthN_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types.Empty) + if err := dec(in); err != nil { + return nil, err } - for i := range this.Alg { - if this.Alg[i] != that1.Alg[i] { - return false - } + if interceptor == nil { + return srv.(PublicAuthNServer).HealthCheck(ctx, in) } - if this.Kty != that1.Kty { - return false + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/HealthCheck", } - if this.Kid != that1.Kid { - return false + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).HealthCheck(ctx, req.(*types.Empty)) } - if this.E != that1.E { - return false - } - if this.N != that1.N { - return false - } - return true + return interceptor(ctx, in, info, handler) } -func (this *JWKSResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*JWKSResponse) - if !ok { - that2, ok := that.(JWKSResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false +var _PublicAuthN_serviceDesc = grpc.ServiceDesc{ + ServiceName: "grpc.PublicAuthN", + HandlerType: (*PublicAuthNServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Signup", + Handler: _PublicAuthN_Signup_Handler, + }, + { + MethodName: "IsUsernameAvailable", + Handler: _PublicAuthN_IsUsernameAvailable_Handler, + }, + { + MethodName: "Login", + Handler: _PublicAuthN_Login_Handler, + }, + { + MethodName: "RefreshSession", + Handler: _PublicAuthN_RefreshSession_Handler, + }, + { + MethodName: "Logout", + Handler: _PublicAuthN_Logout_Handler, + }, + { + MethodName: "RequestPasswordReset", + Handler: _PublicAuthN_RequestPasswordReset_Handler, + }, + { + MethodName: "ChangePassword", + Handler: _PublicAuthN_ChangePassword_Handler, + }, + { + MethodName: "BeginOAuth", + Handler: _PublicAuthN_BeginOAuth_Handler, + }, + { + MethodName: "OAuthReturn", + Handler: _PublicAuthN_OAuthReturn_Handler, + }, + { + MethodName: "ServiceConfiguration", + Handler: _PublicAuthN_ServiceConfiguration_Handler, + }, + { + MethodName: "JWKS", + Handler: _PublicAuthN_JWKS_Handler, + }, + { + MethodName: "HealthCheck", + Handler: _PublicAuthN_HealthCheck_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn.proto", +} + +func (m *SignupRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - if len(this.Keys) != len(that1.Keys) { - return false + return dAtA[:n], nil +} + +func (m *SignupRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - for i := range this.Keys { - if !this.Keys[i].Equal(that1.Keys[i]) { - return false - } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) } - return true + return i, nil } -func (this *SignupRequest) GoString() string { - if this == nil { - return "nil" + +func (m *SignupResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 6) - s = append(s, "&grpc.SignupRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *SignupResponse) GoString() string { - if this == nil { - return "nil" + +func (m *SignupResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.IdToken) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) + i += copy(dAtA[i:], m.IdToken) } - s := make([]string, 0, 5) - s = append(s, "&grpc.SignupResponse{") - s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *SignupResponseEnvelope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&grpc.SignupResponseEnvelope{") - if this.Result != nil { - s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + +func (m *SignupResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *GetAccountRequest) GoString() string { - if this == nil { - return "nil" + +func (m *SignupResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n1, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 } - s := make([]string, 0, 5) - s = append(s, "&grpc.GetAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *GetAccountResponse) GoString() string { - if this == nil { - return "nil" + +func (m *IsUsernameAvailableRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 8) - s = append(s, "&grpc.GetAccountResponse{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") - s = append(s, "Deleted: "+fmt.Sprintf("%#v", this.Deleted)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *GetAccountResponseEnvelope) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&grpc.GetAccountResponseEnvelope{") - if this.Result != nil { - s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + +func (m *IsUsernameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *UpdateAccountRequest) GoString() string { - if this == nil { - return "nil" + +func (m *IsUsernameAvailableResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 6) - s = append(s, "&grpc.UpdateAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *IsUsernameAvailableRequest) GoString() string { - if this == nil { - return "nil" + +func (m *IsUsernameAvailableResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result { + dAtA[i] = 0x8 + i++ + if m.Result { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ } - s := make([]string, 0, 5) - s = append(s, "&grpc.IsUsernameAvailableRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *IsUsernameAvailableResponseEnvelope) GoString() string { - if this == nil { - return "nil" + +func (m *LoginRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.IsUsernameAvailableResponseEnvelope{") - s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *LockAccountRequest) GoString() string { - if this == nil { - return "nil" + +func (m *LoginRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - s := make([]string, 0, 5) - s = append(s, "&grpc.LockAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UnlockAccountRequest) GoString() string { - if this == nil { - return "nil" + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) } - s := make([]string, 0, 5) - s = append(s, "&grpc.UnlockAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *ArchiveAccountRequest) GoString() string { - if this == nil { - return "nil" + +func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.ArchiveAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *ImportAccountRequst) GoString() string { - if this == nil { - return "nil" + +func (m *PasswordResetRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - s := make([]string, 0, 7) - s = append(s, "&grpc.ImportAccountRequst{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "Locked: "+fmt.Sprintf("%#v", this.Locked)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *ImportAccountResponse) GoString() string { - if this == nil { - return "nil" + +func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.ImportAccountResponse{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *ImportAccountResponseEnvelope) GoString() string { - if this == nil { - return "nil" + +func (m *ChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Password) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) } - s := make([]string, 0, 5) - s = append(s, "&grpc.ImportAccountResponseEnvelope{") - if this.Result != nil { - s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + if len(m.Token) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) + i += copy(dAtA[i:], m.Token) } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *LoginRequest) GoString() string { - if this == nil { - return "nil" + if len(m.CurrentPassword) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.CurrentPassword))) + i += copy(dAtA[i:], m.CurrentPassword) } - s := make([]string, 0, 6) - s = append(s, "&grpc.LoginRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *PasswordResetRequest) GoString() string { - if this == nil { - return "nil" + +func (m *BeginOAuthRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.PasswordResetRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *ChangePasswordRequest) GoString() string { - if this == nil { - return "nil" + +func (m *BeginOAuthRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProviderName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) + i += copy(dAtA[i:], m.ProviderName) } - s := make([]string, 0, 7) - s = append(s, "&grpc.ChangePasswordRequest{") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "Token: "+fmt.Sprintf("%#v", this.Token)+",\n") - s = append(s, "CurrentPassword: "+fmt.Sprintf("%#v", this.CurrentPassword)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ExpirePasswordRequest) GoString() string { - if this == nil { - return "nil" + if len(m.RedirectURI) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.RedirectURI))) + i += copy(dAtA[i:], m.RedirectURI) } - s := make([]string, 0, 5) - s = append(s, "&grpc.ExpirePasswordRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *BeginOAuthRequest) GoString() string { - if this == nil { - return "nil" + +func (m *BeginOAuthResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 6) - s = append(s, "&grpc.BeginOAuthRequest{") - s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") - s = append(s, "RedirectURI: "+fmt.Sprintf("%#v", this.RedirectURI)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *BeginOAuthResponse) GoString() string { - if this == nil { - return "nil" + +func (m *BeginOAuthResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Provider))) + i += copy(dAtA[i:], m.Provider) } - s := make([]string, 0, 5) - s = append(s, "&grpc.BeginOAuthResponse{") - s = append(s, "Provider: "+fmt.Sprintf("%#v", this.Provider)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *OAuthReturnRequest) GoString() string { - if this == nil { - return "nil" + +func (m *OAuthReturnRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 5) - s = append(s, "&grpc.OAuthReturnRequest{") - s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return dAtA[:n], nil } -func (this *OAuthReturnResponse) GoString() string { - if this == nil { - return "nil" + +func (m *OAuthReturnRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProviderName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) + i += copy(dAtA[i:], m.ProviderName) } - s := make([]string, 0, 5) - s = append(s, "&grpc.OAuthReturnResponse{") - s = append(s, "Redirect: "+fmt.Sprintf("%#v", this.Redirect)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return i, nil } -func (this *Configuration) GoString() string { - if this == nil { - return "nil" + +func (m *OAuthReturnResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := make([]string, 0, 10) - s = append(s, "&grpc.Configuration{") - s = append(s, "Issuer: "+fmt.Sprintf("%#v", this.Issuer)+",\n") - s = append(s, "ResponseTypesSupported: "+fmt.Sprintf("%#v", this.ResponseTypesSupported)+",\n") - s = append(s, "SubjectTypesSupported: "+fmt.Sprintf("%#v", this.SubjectTypesSupported)+",\n") - s = append(s, "IdTokenSigningAlgValuesSupported: "+fmt.Sprintf("%#v", this.IdTokenSigningAlgValuesSupported)+",\n") - s = append(s, "ClaimsSupported: "+fmt.Sprintf("%#v", this.ClaimsSupported)+",\n") - s = append(s, "JwksUri: "+fmt.Sprintf("%#v", this.JwksUri)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ServiceStatsResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&grpc.ServiceStatsResponse{") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *HealthCheckResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&grpc.HealthCheckResponse{") - s = append(s, "Http: "+fmt.Sprintf("%#v", this.Http)+",\n") - s = append(s, "Db: "+fmt.Sprintf("%#v", this.Db)+",\n") - s = append(s, "Redis: "+fmt.Sprintf("%#v", this.Redis)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Key) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&grpc.Key{") - s = append(s, "Use: "+fmt.Sprintf("%#v", this.Use)+",\n") - s = append(s, "Alg: "+fmt.Sprintf("%#v", this.Alg)+",\n") - s = append(s, "Kty: "+fmt.Sprintf("%#v", this.Kty)+",\n") - s = append(s, "Kid: "+fmt.Sprintf("%#v", this.Kid)+",\n") - s = append(s, "E: "+fmt.Sprintf("%#v", this.E)+",\n") - s = append(s, "N: "+fmt.Sprintf("%#v", this.N)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *JWKSResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&grpc.JWKSResponse{") - if this.Keys != nil { - s = append(s, "Keys: "+fmt.Sprintf("%#v", this.Keys)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringAuthn(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// AuthNClient is the client API for AuthN service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AuthNClient interface { - Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) - GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) - LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) - Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) - RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) - Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) - RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) - ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) - ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) - BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) - OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) - ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) - JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) - ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) - ServerStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) - HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) -} - -type authNClient struct { - cc *grpc.ClientConn -} - -func NewAuthNClient(cc *grpc.ClientConn) AuthNClient { - return &authNClient{cc} + return dAtA[:n], nil } -func (c *authNClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { - out := new(SignupResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AuthN/Signup", in, out, opts...) - if err != nil { - return nil, err +func (m *OAuthReturnResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Redirect) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Redirect))) + i += copy(dAtA[i:], m.Redirect) } - return out, nil + return i, nil } -func (c *authNClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) { - out := new(GetAccountResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AuthN/GetAccount", in, out, opts...) +func (m *Configuration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *authNClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/UpdateAccount", in, out, opts...) - if err != nil { - return nil, err +func (m *Configuration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Issuer) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Issuer))) + i += copy(dAtA[i:], m.Issuer) } - return out, nil -} - -func (c *authNClient) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) { - out := new(IsUsernameAvailableResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AuthN/IsUsernameAvailable", in, out, opts...) - if err != nil { - return nil, err + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return out, nil -} - -func (c *authNClient) LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/LockAccount", in, out, opts...) - if err != nil { - return nil, err + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return out, nil -} - -func (c *authNClient) UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/UnlockAcount", in, out, opts...) - if err != nil { - return nil, err + if len(m.IdTokenSigningAlgValuesSupported) > 0 { + for _, s := range m.IdTokenSigningAlgValuesSupported { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return out, nil + if len(m.ClaimsSupported) > 0 { + for _, s := range m.ClaimsSupported { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.JwksUri) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.JwksUri))) + i += copy(dAtA[i:], m.JwksUri) + } + return i, nil } -func (c *authNClient) ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ArchiveAccount", in, out, opts...) +func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *authNClient) ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) { - out := new(ImportAccountResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ImportAccount", in, out, opts...) - if err != nil { - return nil, err +func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Http { + dAtA[i] = 0x8 + i++ + if m.Http { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ } - return out, nil + if m.Db { + dAtA[i] = 0x10 + i++ + if m.Db { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Redis { + dAtA[i] = 0x18 + i++ + if m.Redis { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil } -func (c *authNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/Login", in, out, opts...) +func (m *Key) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *authNClient) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/RefreshSession", in, out, opts...) - if err != nil { - return nil, err +func (m *Key) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Use) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Use))) + i += copy(dAtA[i:], m.Use) } - return out, nil -} - -func (c *authNClient) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/Logout", in, out, opts...) - if err != nil { - return nil, err + if len(m.Alg) > 0 { + for _, s := range m.Alg { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } } - return out, nil -} - -func (c *authNClient) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/RequestPasswordReset", in, out, opts...) - if err != nil { - return nil, err + if len(m.Kty) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kty))) + i += copy(dAtA[i:], m.Kty) } - return out, nil -} - -func (c *authNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ChangePassword", in, out, opts...) - if err != nil { - return nil, err + if len(m.Kid) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kid))) + i += copy(dAtA[i:], m.Kid) } - return out, nil + if len(m.E) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.E))) + i += copy(dAtA[i:], m.E) + } + if len(m.N) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.N))) + i += copy(dAtA[i:], m.N) + } + return i, nil } -func (c *authNClient) ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ExpirePassword", in, out, opts...) +func (m *JWKSResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } - return out, nil + return dAtA[:n], nil } -func (c *authNClient) BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) { - out := new(BeginOAuthResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/BeginOAuth", in, out, opts...) - if err != nil { - return nil, err +func (m *JWKSResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Keys) > 0 { + for _, msg := range m.Keys { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - return out, nil + return i, nil } -func (c *authNClient) OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) { - out := new(OAuthReturnResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/OAuthReturn", in, out, opts...) - if err != nil { - return nil, err +func encodeVarintAuthn(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return out, nil + dAtA[offset] = uint8(v) + return offset + 1 } - -func (c *authNClient) ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) { - out := new(Configuration) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ServiceConfiguration", in, out, opts...) - if err != nil { - return nil, err +func (m *SignupRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return out, nil + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n } -func (c *authNClient) JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) { - out := new(JWKSResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/JWKS", in, out, opts...) - if err != nil { - return nil, err +func (m *SignupResponse) Size() (n int) { + var l int + _ = l + l = len(m.IdToken) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return out, nil + return n } -func (c *authNClient) ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) { - out := new(ServiceStatsResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ServiceStats", in, out, opts...) - if err != nil { - return nil, err +func (m *SignupResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthn(uint64(l)) } - return out, nil + return n } -func (c *authNClient) ServerStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AuthN/ServerStats", in, out, opts...) - if err != nil { - return nil, err +func (m *IsUsernameAvailableRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return out, nil + return n } -func (c *authNClient) HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { - out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, "/grpc.AuthN/HealthCheck", in, out, opts...) - if err != nil { - return nil, err +func (m *IsUsernameAvailableResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result { + n += 2 } - return out, nil + return n } -// AuthNServer is the server API for AuthN service. -type AuthNServer interface { - Signup(context.Context, *SignupRequest) (*SignupResponseEnvelope, error) - GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponseEnvelope, error) - UpdateAccount(context.Context, *UpdateAccountRequest) (*types.Empty, error) - IsUsernameAvailable(context.Context, *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) - LockAccount(context.Context, *LockAccountRequest) (*types.Empty, error) - UnlockAcount(context.Context, *UnlockAccountRequest) (*types.Empty, error) - ArchiveAccount(context.Context, *ArchiveAccountRequest) (*types.Empty, error) - ImportAccount(context.Context, *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) - Login(context.Context, *LoginRequest) (*SignupResponse, error) - RefreshSession(context.Context, *types.Empty) (*SignupResponse, error) - Logout(context.Context, *types.Empty) (*types.Empty, error) - RequestPasswordReset(context.Context, *PasswordResetRequest) (*types.Empty, error) - ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponse, error) - ExpirePassword(context.Context, *ExpirePasswordRequest) (*types.Empty, error) - BeginOAuth(context.Context, *BeginOAuthRequest) (*BeginOAuthResponse, error) - OAuthReturn(context.Context, *OAuthReturnRequest) (*OAuthReturnResponse, error) - ServiceConfiguration(context.Context, *types.Empty) (*Configuration, error) - JWKS(context.Context, *types.Empty) (*JWKSResponse, error) - ServiceStats(context.Context, *types.Empty) (*ServiceStatsResponse, error) - ServerStats(context.Context, *types.Empty) (*types.Empty, error) - HealthCheck(context.Context, *types.Empty) (*HealthCheckResponse, error) +func (m *LoginRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n } -func RegisterAuthNServer(s *grpc.Server, srv AuthNServer) { - s.RegisterService(&_AuthN_serviceDesc, srv) +func (m *PasswordResetRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n } -func _AuthN_Signup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).Signup(ctx, in) +func (m *ChangePasswordRequest) Size() (n int) { + var l int + _ = l + l = len(m.Password) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/Signup", + l = len(m.Token) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).Signup(ctx, req.(*SignupRequest)) + l = len(m.CurrentPassword) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/GetAccount", +func (m *BeginOAuthRequest) Size() (n int) { + var l int + _ = l + l = len(m.ProviderName) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).GetAccount(ctx, req.(*GetAccountRequest)) + l = len(m.RedirectURI) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).UpdateAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/UpdateAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).UpdateAccount(ctx, req.(*UpdateAccountRequest)) +func (m *BeginOAuthResponse) Size() (n int) { + var l int + _ = l + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_IsUsernameAvailable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsUsernameAvailableRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).IsUsernameAvailable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/IsUsernameAvailable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).IsUsernameAvailable(ctx, req.(*IsUsernameAvailableRequest)) +func (m *OAuthReturnRequest) Size() (n int) { + var l int + _ = l + l = len(m.ProviderName) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_LockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LockAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).LockAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/LockAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).LockAccount(ctx, req.(*LockAccountRequest)) +func (m *OAuthReturnResponse) Size() (n int) { + var l int + _ = l + l = len(m.Redirect) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_UnlockAcount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnlockAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).UnlockAcount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/UnlockAcount", +func (m *Configuration) Size() (n int) { + var l int + _ = l + l = len(m.Issuer) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).UnlockAcount(ctx, req.(*UnlockAccountRequest)) + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_ArchiveAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveAccountRequest) - if err := dec(in); err != nil { - return nil, err + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - if interceptor == nil { - return srv.(AuthNServer).ArchiveAccount(ctx, in) + if len(m.IdTokenSigningAlgValuesSupported) > 0 { + for _, s := range m.IdTokenSigningAlgValuesSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ArchiveAccount", + if len(m.ClaimsSupported) > 0 { + for _, s := range m.ClaimsSupported { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ArchiveAccount(ctx, req.(*ArchiveAccountRequest)) + l = len(m.JwksUri) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_ImportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportAccountRequst) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).ImportAccount(ctx, in) +func (m *HealthCheckResponse) Size() (n int) { + var l int + _ = l + if m.Http { + n += 2 } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ImportAccount", + if m.Db { + n += 2 } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ImportAccount(ctx, req.(*ImportAccountRequst)) + if m.Redis { + n += 2 } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoginRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).Login(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/Login", +func (m *Key) Size() (n int) { + var l int + _ = l + l = len(m.Use) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).Login(ctx, req.(*LoginRequest)) + if len(m.Alg) > 0 { + for _, s := range m.Alg { + l = len(s) + n += 1 + l + sovAuthn(uint64(l)) + } } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_RefreshSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err + l = len(m.Kty) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - if interceptor == nil { - return srv.(AuthNServer).RefreshSession(ctx, in) + l = len(m.Kid) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/RefreshSession", + l = len(m.E) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).RefreshSession(ctx, req.(*types.Empty)) + l = len(m.N) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).Logout(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/Logout", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).Logout(ctx, req.(*types.Empty)) +func (m *JWKSResponse) Size() (n int) { + var l int + _ = l + if len(m.Keys) > 0 { + for _, e := range m.Keys { + l = e.Size() + n += 1 + l + sovAuthn(uint64(l)) + } } - return interceptor(ctx, in, info, handler) + return n } -func _AuthN_RequestPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PasswordResetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).RequestPasswordReset(ctx, in) +func sovAuthn(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/RequestPasswordReset", + return n +} +func sozAuthn(x uint64) (n int) { + return sovAuthn(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *SignupRequest) String() string { + if this == nil { + return "nil" } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).RequestPasswordReset(ctx, req.(*PasswordResetRequest)) + s := strings.Join([]string{`&SignupRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `}`, + }, "") + return s +} +func (this *SignupResponse) String() string { + if this == nil { + return "nil" } - return interceptor(ctx, in, info, handler) + s := strings.Join([]string{`&SignupResponse{`, + `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, + `}`, + }, "") + return s } - -func _AuthN_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangePasswordRequest) - if err := dec(in); err != nil { - return nil, err +func (this *SignupResponseEnvelope) String() string { + if this == nil { + return "nil" } - if interceptor == nil { - return srv.(AuthNServer).ChangePassword(ctx, in) + s := strings.Join([]string{`&SignupResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "SignupResponse", "SignupResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *IsUsernameAvailableRequest) String() string { + if this == nil { + return "nil" } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ChangePassword", + s := strings.Join([]string{`&IsUsernameAvailableRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *IsUsernameAvailableResponseEnvelope) String() string { + if this == nil { + return "nil" } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) + s := strings.Join([]string{`&IsUsernameAvailableResponseEnvelope{`, + `Result:` + fmt.Sprintf("%v", this.Result) + `,`, + `}`, + }, "") + return s +} +func (this *LoginRequest) String() string { + if this == nil { + return "nil" } - return interceptor(ctx, in, info, handler) + s := strings.Join([]string{`&LoginRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `}`, + }, "") + return s } - -func _AuthN_ExpirePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExpirePasswordRequest) - if err := dec(in); err != nil { - return nil, err +func (this *PasswordResetRequest) String() string { + if this == nil { + return "nil" } - if interceptor == nil { - return srv.(AuthNServer).ExpirePassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ExpirePassword", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ExpirePassword(ctx, req.(*ExpirePasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_BeginOAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BeginOAuthRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).BeginOAuth(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/BeginOAuth", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).BeginOAuth(ctx, req.(*BeginOAuthRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_OAuthReturn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OAuthReturnRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).OAuthReturn(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/OAuthReturn", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).OAuthReturn(ctx, req.(*OAuthReturnRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_ServiceConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).ServiceConfiguration(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ServiceConfiguration", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ServiceConfiguration(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_JWKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).JWKS(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/JWKS", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).JWKS(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_ServiceStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).ServiceStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ServiceStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ServiceStats(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_ServerStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).ServerStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/ServerStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).ServerStats(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthN_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthNServer).HealthCheck(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AuthN/HealthCheck", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthNServer).HealthCheck(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _AuthN_serviceDesc = grpc.ServiceDesc{ - ServiceName: "grpc.AuthN", - HandlerType: (*AuthNServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Signup", - Handler: _AuthN_Signup_Handler, - }, - { - MethodName: "GetAccount", - Handler: _AuthN_GetAccount_Handler, - }, - { - MethodName: "UpdateAccount", - Handler: _AuthN_UpdateAccount_Handler, - }, - { - MethodName: "IsUsernameAvailable", - Handler: _AuthN_IsUsernameAvailable_Handler, - }, - { - MethodName: "LockAccount", - Handler: _AuthN_LockAccount_Handler, - }, - { - MethodName: "UnlockAcount", - Handler: _AuthN_UnlockAcount_Handler, - }, - { - MethodName: "ArchiveAccount", - Handler: _AuthN_ArchiveAccount_Handler, - }, - { - MethodName: "ImportAccount", - Handler: _AuthN_ImportAccount_Handler, - }, - { - MethodName: "Login", - Handler: _AuthN_Login_Handler, - }, - { - MethodName: "RefreshSession", - Handler: _AuthN_RefreshSession_Handler, - }, - { - MethodName: "Logout", - Handler: _AuthN_Logout_Handler, - }, - { - MethodName: "RequestPasswordReset", - Handler: _AuthN_RequestPasswordReset_Handler, - }, - { - MethodName: "ChangePassword", - Handler: _AuthN_ChangePassword_Handler, - }, - { - MethodName: "ExpirePassword", - Handler: _AuthN_ExpirePassword_Handler, - }, - { - MethodName: "BeginOAuth", - Handler: _AuthN_BeginOAuth_Handler, - }, - { - MethodName: "OAuthReturn", - Handler: _AuthN_OAuthReturn_Handler, - }, - { - MethodName: "ServiceConfiguration", - Handler: _AuthN_ServiceConfiguration_Handler, - }, - { - MethodName: "JWKS", - Handler: _AuthN_JWKS_Handler, - }, - { - MethodName: "ServiceStats", - Handler: _AuthN_ServiceStats_Handler, - }, - { - MethodName: "ServerStats", - Handler: _AuthN_ServerStats_Handler, - }, - { - MethodName: "HealthCheck", - Handler: _AuthN_HealthCheck_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "authn.proto", -} - -func (m *SignupRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignupRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if len(m.Password) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - return i, nil + s := strings.Join([]string{`&PasswordResetRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s } - -func (m *SignupResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err +func (this *ChangePasswordRequest) String() string { + if this == nil { + return "nil" } - return dAtA[:n], nil + s := strings.Join([]string{`&ChangePasswordRequest{`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Token:` + fmt.Sprintf("%v", this.Token) + `,`, + `CurrentPassword:` + fmt.Sprintf("%v", this.CurrentPassword) + `,`, + `}`, + }, "") + return s } - -func (m *SignupResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.IdToken) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) - i += copy(dAtA[i:], m.IdToken) +func (this *BeginOAuthRequest) String() string { + if this == nil { + return "nil" } - return i, nil + s := strings.Join([]string{`&BeginOAuthRequest{`, + `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, + `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, + `}`, + }, "") + return s } - -func (m *SignupResponseEnvelope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err +func (this *BeginOAuthResponse) String() string { + if this == nil { + return "nil" } - return dAtA[:n], nil + s := strings.Join([]string{`&BeginOAuthResponse{`, + `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, + `}`, + }, "") + return s } - -func (m *SignupResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Result != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) - n1, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - return i, nil -} - -func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *GetAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetAccountResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Id)) - } - if len(m.Username) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if m.Locked { - dAtA[i] = 0x18 - i++ - if m.Locked { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Deleted { - dAtA[i] = 0x20 - i++ - if m.Deleted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *GetAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Result != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) - n2, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} - -func (m *UpdateAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpdateAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - if len(m.Username) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - return i, nil -} - -func (m *IsUsernameAvailableRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IsUsernameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - return i, nil -} - -func (m *IsUsernameAvailableResponseEnvelope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IsUsernameAvailableResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Result { - dAtA[i] = 0x8 - i++ - if m.Result { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *LockAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LockAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *UnlockAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UnlockAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *ArchiveAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ArchiveAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *ImportAccountRequst) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportAccountRequst) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if len(m.Password) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - if m.Locked { - dAtA[i] = 0x18 - i++ - if m.Locked { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *ImportAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportAccountResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Id != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Id)) - } - return i, nil -} - -func (m *ImportAccountResponseEnvelope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportAccountResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Result != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) - n3, err := m.Result.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - return i, nil -} - -func (m *LoginRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoginRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if len(m.Password) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - return i, nil -} - -func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PasswordResetRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - return i, nil -} - -func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Password) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - if len(m.Token) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) - i += copy(dAtA[i:], m.Token) - } - if len(m.CurrentPassword) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.CurrentPassword))) - i += copy(dAtA[i:], m.CurrentPassword) - } - return i, nil -} - -func (m *ExpirePasswordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExpirePasswordRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } - return i, nil -} - -func (m *BeginOAuthRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeginOAuthRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ProviderName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) - i += copy(dAtA[i:], m.ProviderName) - } - if len(m.RedirectURI) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.RedirectURI))) - i += copy(dAtA[i:], m.RedirectURI) - } - return i, nil -} - -func (m *BeginOAuthResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BeginOAuthResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Provider) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Provider))) - i += copy(dAtA[i:], m.Provider) - } - return i, nil -} - -func (m *OAuthReturnRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthReturnRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ProviderName) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) - i += copy(dAtA[i:], m.ProviderName) - } - return i, nil -} - -func (m *OAuthReturnResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthReturnResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Redirect) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Redirect))) - i += copy(dAtA[i:], m.Redirect) - } - return i, nil -} - -func (m *Configuration) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Configuration) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Issuer) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Issuer))) - i += copy(dAtA[i:], m.Issuer) - } - if len(m.ResponseTypesSupported) > 0 { - for _, s := range m.ResponseTypesSupported { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.SubjectTypesSupported) > 0 { - for _, s := range m.SubjectTypesSupported { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.IdTokenSigningAlgValuesSupported) > 0 { - for _, s := range m.IdTokenSigningAlgValuesSupported { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.ClaimsSupported) > 0 { - for _, s := range m.ClaimsSupported { - dAtA[i] = 0x2a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.JwksUri) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.JwksUri))) - i += copy(dAtA[i:], m.JwksUri) - } - return i, nil -} - -func (m *ServiceStatsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceStatsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil -} - -func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Http { - dAtA[i] = 0x8 - i++ - if m.Http { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Db { - dAtA[i] = 0x10 - i++ - if m.Db { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Redis { - dAtA[i] = 0x18 - i++ - if m.Redis { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *Key) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Key) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Use) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Use))) - i += copy(dAtA[i:], m.Use) - } - if len(m.Alg) > 0 { - for _, s := range m.Alg { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Kty) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kty))) - i += copy(dAtA[i:], m.Kty) - } - if len(m.Kid) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kid))) - i += copy(dAtA[i:], m.Kid) - } - if len(m.E) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.E))) - i += copy(dAtA[i:], m.E) - } - if len(m.N) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.N))) - i += copy(dAtA[i:], m.N) - } - return i, nil -} - -func (m *JWKSResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JWKSResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Keys) > 0 { - for _, msg := range m.Keys { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func encodeVarintAuthn(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *SignupRequest) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *SignupResponse) Size() (n int) { - var l int - _ = l - l = len(m.IdToken) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *SignupResponseEnvelope) Size() (n int) { - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *GetAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *GetAccountResponse) Size() (n int) { - var l int - _ = l - if m.Id != 0 { - n += 1 + sovAuthn(uint64(m.Id)) - } - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if m.Locked { - n += 2 - } - if m.Deleted { - n += 2 - } - return n -} - -func (m *GetAccountResponseEnvelope) Size() (n int) { - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *UpdateAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *IsUsernameAvailableRequest) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *IsUsernameAvailableResponseEnvelope) Size() (n int) { - var l int - _ = l - if m.Result { - n += 2 - } - return n -} - -func (m *LockAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *UnlockAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ArchiveAccountRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ImportAccountRequst) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if m.Locked { - n += 2 - } - return n -} - -func (m *ImportAccountResponse) Size() (n int) { - var l int - _ = l - if m.Id != 0 { - n += 1 + sovAuthn(uint64(m.Id)) - } - return n -} - -func (m *ImportAccountResponseEnvelope) Size() (n int) { - var l int - _ = l - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *LoginRequest) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *PasswordResetRequest) Size() (n int) { - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ChangePasswordRequest) Size() (n int) { - var l int - _ = l - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Token) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.CurrentPassword) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ExpirePasswordRequest) Size() (n int) { - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *BeginOAuthRequest) Size() (n int) { - var l int - _ = l - l = len(m.ProviderName) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.RedirectURI) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *BeginOAuthResponse) Size() (n int) { - var l int - _ = l - l = len(m.Provider) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *OAuthReturnRequest) Size() (n int) { - var l int - _ = l - l = len(m.ProviderName) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *OAuthReturnResponse) Size() (n int) { - var l int - _ = l - l = len(m.Redirect) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *Configuration) Size() (n int) { - var l int - _ = l - l = len(m.Issuer) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if len(m.ResponseTypesSupported) > 0 { - for _, s := range m.ResponseTypesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.SubjectTypesSupported) > 0 { - for _, s := range m.SubjectTypesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.IdTokenSigningAlgValuesSupported) > 0 { - for _, s := range m.IdTokenSigningAlgValuesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.ClaimsSupported) > 0 { - for _, s := range m.ClaimsSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - l = len(m.JwksUri) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *ServiceStatsResponse) Size() (n int) { - var l int - _ = l - return n -} - -func (m *HealthCheckResponse) Size() (n int) { - var l int - _ = l - if m.Http { - n += 2 - } - if m.Db { - n += 2 - } - if m.Redis { - n += 2 - } - return n -} - -func (m *Key) Size() (n int) { - var l int - _ = l - l = len(m.Use) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if len(m.Alg) > 0 { - for _, s := range m.Alg { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - l = len(m.Kty) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Kid) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.E) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.N) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - return n -} - -func (m *JWKSResponse) Size() (n int) { - var l int - _ = l - if len(m.Keys) > 0 { - for _, e := range m.Keys { - l = e.Size() - n += 1 + l + sovAuthn(uint64(l)) - } - } - return n -} - -func sovAuthn(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozAuthn(x uint64) (n int) { - return sovAuthn(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *SignupRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignupRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `}`, - }, "") - return s -} -func (this *SignupResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignupResponse{`, - `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, - `}`, - }, "") - return s -} -func (this *SignupResponseEnvelope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignupResponseEnvelope{`, - `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "SignupResponse", "SignupResponse", 1) + `,`, - `}`, - }, "") - return s -} -func (this *GetAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *GetAccountResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetAccountResponse{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, - `Deleted:` + fmt.Sprintf("%v", this.Deleted) + `,`, - `}`, - }, "") - return s -} -func (this *GetAccountResponseEnvelope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetAccountResponseEnvelope{`, - `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "GetAccountResponse", "GetAccountResponse", 1) + `,`, - `}`, - }, "") - return s -} -func (this *UpdateAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UpdateAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `}`, - }, "") - return s -} -func (this *IsUsernameAvailableRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IsUsernameAvailableRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `}`, - }, "") - return s -} -func (this *IsUsernameAvailableResponseEnvelope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IsUsernameAvailableResponseEnvelope{`, - `Result:` + fmt.Sprintf("%v", this.Result) + `,`, - `}`, - }, "") - return s -} -func (this *LockAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LockAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *UnlockAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UnlockAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *ArchiveAccountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ArchiveAccountRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *ImportAccountRequst) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImportAccountRequst{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `Locked:` + fmt.Sprintf("%v", this.Locked) + `,`, - `}`, - }, "") - return s -} -func (this *ImportAccountResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImportAccountResponse{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *ImportAccountResponseEnvelope) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImportAccountResponseEnvelope{`, - `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "ImportAccountResponse", "ImportAccountResponse", 1) + `,`, - `}`, - }, "") - return s -} -func (this *LoginRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LoginRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `}`, - }, "") - return s -} -func (this *PasswordResetRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PasswordResetRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `}`, - }, "") - return s -} -func (this *ChangePasswordRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ChangePasswordRequest{`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `Token:` + fmt.Sprintf("%v", this.Token) + `,`, - `CurrentPassword:` + fmt.Sprintf("%v", this.CurrentPassword) + `,`, - `}`, - }, "") - return s -} -func (this *ExpirePasswordRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExpirePasswordRequest{`, - `Id:` + fmt.Sprintf("%v", this.Id) + `,`, - `}`, - }, "") - return s -} -func (this *BeginOAuthRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BeginOAuthRequest{`, - `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, - `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, - `}`, - }, "") - return s -} -func (this *BeginOAuthResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BeginOAuthResponse{`, - `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthReturnRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OAuthReturnRequest{`, - `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthReturnResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OAuthReturnResponse{`, - `Redirect:` + fmt.Sprintf("%v", this.Redirect) + `,`, - `}`, - }, "") - return s -} -func (this *Configuration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Configuration{`, - `Issuer:` + fmt.Sprintf("%v", this.Issuer) + `,`, - `ResponseTypesSupported:` + fmt.Sprintf("%v", this.ResponseTypesSupported) + `,`, - `SubjectTypesSupported:` + fmt.Sprintf("%v", this.SubjectTypesSupported) + `,`, - `IdTokenSigningAlgValuesSupported:` + fmt.Sprintf("%v", this.IdTokenSigningAlgValuesSupported) + `,`, - `ClaimsSupported:` + fmt.Sprintf("%v", this.ClaimsSupported) + `,`, - `JwksUri:` + fmt.Sprintf("%v", this.JwksUri) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceStatsResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceStatsResponse{`, - `}`, - }, "") - return s -} -func (this *HealthCheckResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HealthCheckResponse{`, - `Http:` + fmt.Sprintf("%v", this.Http) + `,`, - `Db:` + fmt.Sprintf("%v", this.Db) + `,`, - `Redis:` + fmt.Sprintf("%v", this.Redis) + `,`, - `}`, - }, "") - return s -} -func (this *Key) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Key{`, - `Use:` + fmt.Sprintf("%v", this.Use) + `,`, - `Alg:` + fmt.Sprintf("%v", this.Alg) + `,`, - `Kty:` + fmt.Sprintf("%v", this.Kty) + `,`, - `Kid:` + fmt.Sprintf("%v", this.Kid) + `,`, - `E:` + fmt.Sprintf("%v", this.E) + `,`, - `N:` + fmt.Sprintf("%v", this.N) + `,`, - `}`, - }, "") - return s -} -func (this *JWKSResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JWKSResponse{`, - `Keys:` + strings.Replace(fmt.Sprintf("%v", this.Keys), "Key", "Key", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringAuthn(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *SignupRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignupRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignupRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignupResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignupResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignupResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IdToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignupResponseEnvelope) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignupResponseEnvelope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignupResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &SignupResponse{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Locked = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Deleted = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAccountResponseEnvelope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &GetAccountResponse{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } +func (this *OAuthReturnRequest) String() string { + if this == nil { + return "nil" } - - if iNdEx > l { - return io.ErrUnexpectedEOF + s := strings.Join([]string{`&OAuthReturnRequest{`, + `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, + `}`, + }, "") + return s +} +func (this *OAuthReturnResponse) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&OAuthReturnResponse{`, + `Redirect:` + fmt.Sprintf("%v", this.Redirect) + `,`, + `}`, + }, "") + return s } -func (m *IsUsernameAvailableRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IsUsernameAvailableRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IsUsernameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } +func (this *Configuration) String() string { + if this == nil { + return "nil" } - - if iNdEx > l { - return io.ErrUnexpectedEOF + s := strings.Join([]string{`&Configuration{`, + `Issuer:` + fmt.Sprintf("%v", this.Issuer) + `,`, + `ResponseTypesSupported:` + fmt.Sprintf("%v", this.ResponseTypesSupported) + `,`, + `SubjectTypesSupported:` + fmt.Sprintf("%v", this.SubjectTypesSupported) + `,`, + `IdTokenSigningAlgValuesSupported:` + fmt.Sprintf("%v", this.IdTokenSigningAlgValuesSupported) + `,`, + `ClaimsSupported:` + fmt.Sprintf("%v", this.ClaimsSupported) + `,`, + `JwksUri:` + fmt.Sprintf("%v", this.JwksUri) + `,`, + `}`, + }, "") + return s +} +func (this *HealthCheckResponse) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&HealthCheckResponse{`, + `Http:` + fmt.Sprintf("%v", this.Http) + `,`, + `Db:` + fmt.Sprintf("%v", this.Db) + `,`, + `Redis:` + fmt.Sprintf("%v", this.Redis) + `,`, + `}`, + }, "") + return s } -func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Result = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } +func (this *Key) String() string { + if this == nil { + return "nil" } - - if iNdEx > l { - return io.ErrUnexpectedEOF + s := strings.Join([]string{`&Key{`, + `Use:` + fmt.Sprintf("%v", this.Use) + `,`, + `Alg:` + fmt.Sprintf("%v", this.Alg) + `,`, + `Kty:` + fmt.Sprintf("%v", this.Kty) + `,`, + `Kid:` + fmt.Sprintf("%v", this.Kid) + `,`, + `E:` + fmt.Sprintf("%v", this.E) + `,`, + `N:` + fmt.Sprintf("%v", this.N) + `,`, + `}`, + }, "") + return s +} +func (this *JWKSResponse) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&JWKSResponse{`, + `Keys:` + strings.Replace(fmt.Sprintf("%v", this.Keys), "Key", "Key", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringAuthn(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) } -func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { +func (m *SignupRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5762,15 +3018,15 @@ func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LockAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SignupRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignupRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5788,68 +3044,18 @@ func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { } } intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn + if intStringLen < 0 { + return ErrInvalidLengthAuthn } - if iNdEx >= l { + postIndex := iNdEx + intStringLen + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnlockAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnlockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5874,7 +3080,7 @@ func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.Password = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5897,7 +3103,7 @@ func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { +func (m *SignupResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5920,15 +3126,15 @@ func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ArchiveAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SignupResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ArchiveAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignupResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5953,7 +3159,7 @@ func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.IdToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5976,7 +3182,7 @@ func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { +func (m *SignupResponseEnvelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5999,17 +3205,17 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImportAccountRequst: wiretype end group for non-group") + return fmt.Errorf("proto: SignupResponseEnvelope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountRequst: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignupResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -6019,70 +3225,25 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuthn } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn + if m.Result == nil { + m.Result = &SignupResponse{} } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Password = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Locked = bool(v != 0) default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -6104,7 +3265,7 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { +func (m *IsUsernameAvailableRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6127,17 +3288,17 @@ func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImportAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: IsUsernameAvailableRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IsUsernameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) } - m.Id = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -6147,11 +3308,21 @@ func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= (int64(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -6173,7 +3344,7 @@ func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { +func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6196,17 +3367,17 @@ func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImportAccountResponseEnvelope: wiretype end group for non-group") + return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -6216,25 +3387,12 @@ func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &ImportAccountResponse{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.Result = bool(v != 0) default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -6580,85 +3738,6 @@ func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExpirePasswordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExpirePasswordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExpirePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *BeginOAuthRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7228,56 +4307,6 @@ func (m *Configuration) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceStatsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceStatsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAuthn(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthAuthn - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7798,102 +4827,77 @@ var ( ErrIntOverflowAuthn = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_975e18bf4e534da8) } - -var fileDescriptor_authn_975e18bf4e534da8 = []byte{ - // 1495 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xdf, 0x6e, 0xd4, 0x46, - 0x17, 0x8f, 0x37, 0xc9, 0x66, 0x73, 0x36, 0xd9, 0x84, 0xd9, 0x4d, 0xb2, 0x18, 0x58, 0x56, 0x86, - 0x0f, 0x02, 0xfa, 0x88, 0xf9, 0x82, 0xf4, 0x89, 0x72, 0x97, 0x20, 0xa0, 0x01, 0x44, 0x60, 0x43, - 0x5a, 0xd1, 0x7f, 0x2b, 0xc7, 0x1e, 0xbc, 0x43, 0x1c, 0xdb, 0xf5, 0x8c, 0x43, 0x23, 0x84, 0x5a, - 0xf5, 0x09, 0x2a, 0xf5, 0x25, 0xb8, 0xec, 0x63, 0xf4, 0x12, 0xa9, 0x37, 0xbd, 0x42, 0x25, 0xed, - 0x45, 0xc5, 0x15, 0x8f, 0x50, 0xcd, 0x78, 0x6c, 0xaf, 0xbd, 0x76, 0x42, 0xdb, 0x3b, 0x9f, 0x99, - 0x73, 0x7e, 0x67, 0xce, 0x99, 0xdf, 0xce, 0xef, 0x24, 0x50, 0x37, 0x42, 0x36, 0x70, 0x57, 0xfc, - 0xc0, 0x63, 0x1e, 0x9a, 0xb0, 0x03, 0xdf, 0x54, 0x4f, 0xd9, 0x9e, 0x67, 0x3b, 0x58, 0x17, 0x6b, - 0x3b, 0xe1, 0x53, 0x1d, 0x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x71, 0x8a, 0x05, 0xd4, 0x4c, 0x4f, 0x61, 0x24, 0x99, 0xbe, 0x80, 0xfa, 0x90, 0xa8, 0x22, - 0x39, 0x4e, 0x8c, 0xea, 0x6c, 0x69, 0x8d, 0x12, 0x5d, 0x6d, 0x66, 0x6b, 0xd4, 0xb9, 0xac, 0x21, - 0x03, 0x66, 0x62, 0x31, 0xce, 0x34, 0xb1, 0x40, 0xa0, 0x4b, 0x13, 0x9c, 0x11, 0x09, 0x96, 0xd4, - 0x85, 0x5c, 0x82, 0x50, 0x80, 0xa0, 0x2f, 0xa1, 0x91, 0xd5, 0x71, 0x24, 0x75, 0xae, 0x50, 0xdd, - 0x4b, 0xb3, 0x48, 0x1e, 0x5c, 0xce, 0xf3, 0xc0, 0x81, 0xd9, 0x8c, 0x60, 0xa2, 0x93, 0x85, 0x2a, - 0xca, 0x47, 0x02, 0xf5, 0xdc, 0x11, 0x02, 0x9b, 0xbf, 0x0d, 0x6d, 0x3e, 0x4d, 0x44, 0x44, 0x00, - 0xa7, 0xf5, 0x6d, 0x98, 0x14, 0xea, 0x8b, 0x50, 0x7c, 0x0f, 0xa9, 0x14, 0xab, 0x85, 0xf3, 0xac, - 0xd6, 0x14, 0x78, 0xb3, 0x5a, 0x4d, 0xa7, 0x98, 0x52, 0xe2, 0xb9, 0x1c, 0xe7, 0x21, 0x34, 0x7a, - 0xf8, 0x69, 0x80, 0xe9, 0x60, 0x2b, 0x5a, 0x44, 0x25, 0x75, 0x97, 0x80, 0xce, 0x0b, 0x50, 0x40, - 0x09, 0x28, 0xba, 0x0b, 0xd5, 0xfb, 0x9e, 0xed, 0x85, 0xac, 0x14, 0xa9, 0xac, 0xb3, 0x12, 0xeb, - 0x72, 0x8a, 0x65, 0x42, 0x4b, 0xd6, 0x94, 0x19, 0x11, 0x62, 0x76, 0x14, 0xcd, 0x0d, 0xa5, 0xe8, - 0x4b, 0x02, 0xfd, 0x04, 0x9a, 0xd3, 0xe3, 0x89, 0x40, 0x0f, 0x04, 0xd8, 0x13, 0x68, 0x64, 0x87, - 0x89, 0x98, 0x17, 0x85, 0x23, 0x46, 0x49, 0x1f, 0xd2, 0xc7, 0x27, 0x46, 0xe7, 0xdd, 0xdd, 0x83, - 0x46, 0x76, 0x64, 0x88, 0xa1, 0x0b, 0x07, 0x89, 0xd2, 0xa3, 0x5f, 0x10, 0xe0, 0x5d, 0xb5, 0x93, - 0x23, 0x36, 0x16, 0x28, 0xfd, 0x64, 0xc2, 0xf9, 0x0a, 0x20, 0x9d, 0x0e, 0xe2, 0xb7, 0x6e, 0x64, - 0x14, 0x51, 0xdb, 0xa3, 0x1b, 0xb2, 0x0a, 0xf9, 0x0b, 0x42, 0x0b, 0xba, 0xc7, 0xff, 0x7a, 0xd4, - 0x5f, 0x0c, 0x0f, 0x04, 0x2f, 0xd1, 0x00, 0xea, 0x43, 0x13, 0x41, 0xfc, 0x04, 0x8c, 0x8e, 0x17, - 0xea, 0xc9, 0x82, 0x1d, 0x99, 0xe2, 0xbc, 0x48, 0xd1, 0x41, 0xa7, 0x0b, 0x53, 0xe8, 0x41, 0x04, - 0xfd, 0x79, 0xa2, 0x8a, 0xb9, 0x71, 0xa2, 0x84, 0x52, 0x52, 0x2e, 0x32, 0xce, 0x43, 0x2f, 0xb6, - 0x99, 0x01, 0x59, 0x83, 0x09, 0x2e, 0x4f, 0xa5, 0x60, 0xf2, 0x27, 0x35, 0x2c, 0x61, 0xda, 0xac, - 0xc0, 0x9a, 0x42, 0x93, 0x3a, 0x17, 0x6e, 0xd4, 0x83, 0x99, 0x61, 0xd5, 0x2e, 0x85, 0x92, 0x44, - 0x2d, 0x54, 0xf8, 0x86, 0x80, 0xac, 0xa1, 0xaa, 0x4e, 0x05, 0xc6, 0x26, 0xd4, 0xb9, 0x1f, 0x0e, - 0x8e, 0x86, 0x3c, 0xe6, 0xd7, 0x83, 0x6a, 0xfa, 0x1e, 0x66, 0x01, 0x31, 0x29, 0x7a, 0x04, 0xf5, - 0xa1, 0x11, 0xa2, 0x14, 0x50, 0x5e, 0x56, 0xc1, 0xb4, 0xa1, 0xcd, 0x09, 0xcc, 0x69, 0x34, 0xa5, - 0x0f, 0xc4, 0xee, 0xfa, 0xea, 0xeb, 0xb7, 0x9d, 0xb1, 0x5f, 0xdf, 0x76, 0xc6, 0xde, 0xbf, 0xed, - 0x28, 0xdf, 0x1d, 0x76, 0x94, 0x57, 0x87, 0x1d, 0xe5, 0xe7, 0xc3, 0x8e, 0xf2, 0xfa, 0xb0, 0xa3, - 0xfc, 0x76, 0xd8, 0x51, 0xfe, 0x3c, 0xec, 0x8c, 0xbd, 0x3f, 0xec, 0x28, 0x3f, 0xfc, 0xde, 0x19, - 0xfb, 0x4c, 0xfc, 0xd7, 0x61, 0xa7, 0x2a, 0xf2, 0x5d, 0xfb, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x9d, - 0xdf, 0xd9, 0xeb, 0x91, 0x10, 0x00, 0x00, +func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_44d0ba90dadea045) } + +var fileDescriptor_authn_44d0ba90dadea045 = []byte{ + // 1103 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xc6, 0x89, 0xe3, 0xbc, 0x4e, 0x9c, 0x74, 0xec, 0x24, 0xae, 0xdb, 0x6e, 0xa3, 0x05, + 0x44, 0x5a, 0x51, 0x2f, 0x04, 0x09, 0x15, 0x6e, 0x49, 0xd4, 0x40, 0x9a, 0xaa, 0x49, 0xd7, 0x0d, + 0xa8, 0x20, 0x61, 0xad, 0xd7, 0x93, 0xf5, 0x34, 0x9b, 0x9d, 0x65, 0x67, 0x36, 0x95, 0x85, 0x10, + 0x88, 0x5f, 0x80, 0xc4, 0x9f, 0xe0, 0xc8, 0x8f, 0xe0, 0xc0, 0xb1, 0x12, 0x17, 0x4e, 0x15, 0x31, + 0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a, 0x65, 0x54, + 0xb1, 0xbd, 0x1c, 0xc8, 0x16, 0xcc, 0x88, 0xf7, 0x3d, 0x11, 0x4c, 0xef, 0xf8, 0x28, 0x07, 0x58, + 0x8b, 0x12, 0x6b, 0x0e, 0xcd, 0xda, 0x82, 0xe1, 0xd0, 0x23, 0x28, 0x8f, 0xd0, 0xdb, 0x44, 0x24, + 0x3d, 0x87, 0x31, 0x4c, 0x68, 0x2d, 0x49, 0xc0, 0x79, 0x34, 0x67, 0xf7, 0xa4, 0x75, 0x7b, 0xf3, + 0xf9, 0xb9, 0x39, 0xf5, 0xfb, 0xb9, 0x39, 0xf5, 0xea, 0xdc, 0x34, 0xbe, 0x1b, 0x98, 0xc6, 0x4f, + 0x03, 0xd3, 0xf8, 0x75, 0x60, 0x1a, 0xcf, 0x07, 0xa6, 0xf1, 0xc7, 0xc0, 0x34, 0xfe, 0x1e, 0x98, + 0x53, 0xaf, 0x06, 0xa6, 0xf1, 0xc3, 0x9f, 0xe6, 0xd4, 0xe7, 0xf2, 0xf7, 0xb1, 0x53, 0x94, 0xf9, + 0xde, 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0x41, 0x76, 0xd1, 0x84, 0x5a, 0x0a, 0x00, 0x00, } diff --git a/grpc/authn.pb.gw.go b/grpc/authn.pb.gw.go index 9e10cac95b..b2f6f61735 100644 --- a/grpc/authn.pb.gw.go +++ b/grpc/authn.pb.gw.go @@ -29,7 +29,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -func request_AuthN_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SignupRequest var metadata runtime.ServerMetadata @@ -42,73 +42,15 @@ func request_AuthN_Signup_0(ctx context.Context, marshaler runtime.Marshaler, cl } -func request_AuthN_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateAccountRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Username); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UpdateAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - var ( - filter_AuthN_IsUsernameAvailable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_PublicAuthN_IsUsernameAvailable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_AuthN_IsUsernameAvailable_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_IsUsernameAvailable_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq IsUsernameAvailableRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_IsUsernameAvailable_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_IsUsernameAvailable_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -117,101 +59,7 @@ func request_AuthN_IsUsernameAvailable_0(ctx context.Context, marshaler runtime. } -func request_AuthN_LockAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LockAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.LockAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnlockAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UnlockAcount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.ArchiveAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportAccountRequst - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ImportAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LoginRequest var metadata runtime.ServerMetadata @@ -224,7 +72,7 @@ func request_AuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, cli } -func request_AuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -233,7 +81,7 @@ func request_AuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marsh } -func request_AuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -243,14 +91,14 @@ func request_AuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, cl } var ( - filter_AuthN_RequestPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_PublicAuthN_RequestPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_AuthN_RequestPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_RequestPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq PasswordResetRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_RequestPasswordReset_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_RequestPasswordReset_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -259,7 +107,7 @@ func request_AuthN_RequestPasswordReset_0(ctx context.Context, marshaler runtime } -func request_AuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ChangePasswordRequest var metadata runtime.ServerMetadata @@ -272,38 +120,11 @@ func request_AuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marsh } -func request_AuthN_ExpirePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ExpirePasswordRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.ExpirePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - var ( - filter_AuthN_BeginOAuth_0 = &utilities.DoubleArray{Encoding: map[string]int{"providerName": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_PublicAuthN_BeginOAuth_0 = &utilities.DoubleArray{Encoding: map[string]int{"providerName": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_AuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq BeginOAuthRequest var metadata runtime.ServerMetadata @@ -325,7 +146,7 @@ func request_AuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "providerName", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthN_BeginOAuth_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_BeginOAuth_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -334,7 +155,7 @@ func request_AuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler } -func request_AuthN_OAuthReturn_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_OAuthReturn_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq OAuthReturnRequest var metadata runtime.ServerMetadata @@ -361,7 +182,7 @@ func request_AuthN_OAuthReturn_0(ctx context.Context, marshaler runtime.Marshale } -func request_AuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -370,7 +191,7 @@ func request_AuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime } -func request_AuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -379,25 +200,7 @@ func request_AuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, clie } -func request_AuthN_ServiceStats_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty - var metadata runtime.ServerMetadata - - msg, err := client.ServiceStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_ServerStats_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty - var metadata runtime.ServerMetadata - - msg, err := client.ServerStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_AuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PublicAuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Empty var metadata runtime.ServerMetadata @@ -406,9 +209,9 @@ func request_AuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Marshale } -// RegisterAuthNHandlerFromEndpoint is same as RegisterAuthNHandler but +// RegisterPublicAuthNHandlerFromEndpoint is same as RegisterPublicAuthNHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterPublicAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err @@ -428,123 +231,23 @@ func RegisterAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux }() }() - return RegisterAuthNHandler(ctx, mux, conn) + return RegisterPublicAuthNHandler(ctx, mux, conn) } -// RegisterAuthNHandler registers the http handlers for service AuthN to "mux". +// RegisterPublicAuthNHandler registers the http handlers for service PublicAuthN to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAuthNHandlerClient(ctx, mux, NewAuthNClient(conn)) +func RegisterPublicAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPublicAuthNHandlerClient(ctx, mux, NewPublicAuthNClient(conn)) } -// RegisterAuthNHandlerClient registers the http handlers for service AuthN -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthNClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthNClient" +// RegisterPublicAuthNHandlerClient registers the http handlers for service PublicAuthN +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PublicAuthNClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PublicAuthNClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AuthNClient" to call the correct interceptors. -func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthNClient) error { - - mux.Handle("POST", pattern_AuthN_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_Signup_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_Signup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_GetAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_GetAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_AuthN_UpdateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_UpdateAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_UpdateAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_IsUsernameAvailable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_IsUsernameAvailable_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_IsUsernameAvailable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_AuthN_LockAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_LockAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } +// "PublicAuthNClient" to call the correct interceptors. +func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PublicAuthNClient) error { - forward_AuthN_LockAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_AuthN_UnlockAcount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PublicAuthN_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -553,18 +256,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_UnlockAcount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_Signup_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_UnlockAcount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_Signup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AuthN_ArchiveAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_IsUsernameAvailable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -573,18 +276,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ArchiveAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_IsUsernameAvailable_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ArchiveAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_IsUsernameAvailable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AuthN_ImportAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PublicAuthN_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -593,18 +296,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ImportAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_Login_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AuthN_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_RefreshSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -613,18 +316,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_Login_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_RefreshSession_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_RefreshSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_RefreshSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_PublicAuthN_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -633,18 +336,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_RefreshSession_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_Logout_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_RefreshSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AuthN_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_RequestPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -653,18 +356,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_Logout_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_RequestPasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_RequestPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_RequestPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PublicAuthN_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -673,18 +376,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_RequestPasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_RequestPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AuthN_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_BeginOAuth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -693,18 +396,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_BeginOAuth_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_BeginOAuth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_AuthN_ExpirePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_OAuthReturn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -713,18 +416,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ExpirePassword_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_OAuthReturn_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ExpirePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_OAuthReturn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_BeginOAuth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_ServiceConfiguration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -733,18 +436,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_BeginOAuth_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_ServiceConfiguration_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_BeginOAuth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_ServiceConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_OAuthReturn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_JWKS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -753,18 +456,18 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_OAuthReturn_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_JWKS_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_OAuthReturn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_JWKS_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AuthN_ServiceConfiguration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_HealthCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -773,94 +476,14 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthN_ServiceConfiguration_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_HealthCheck_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AuthN_ServiceConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_JWKS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_JWKS_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_JWKS_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_ServiceStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_ServiceStats_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_ServiceStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_ServerStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_ServerStats_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_ServerStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AuthN_HealthCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthN_HealthCheck_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthN_HealthCheck_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_HealthCheck_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -868,89 +491,53 @@ func RegisterAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_AuthN_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"accounts"}, "")) - - pattern_AuthN_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - - pattern_AuthN_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - - pattern_AuthN_IsUsernameAvailable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "available"}, "")) - - pattern_AuthN_LockAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "lock"}, "")) - - pattern_AuthN_UnlockAcount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "unlock"}, "")) - - pattern_AuthN_ArchiveAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - - pattern_AuthN_ImportAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "import"}, "")) - - pattern_AuthN_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - - pattern_AuthN_RefreshSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) + pattern_PublicAuthN_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"accounts"}, "")) - pattern_AuthN_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) + pattern_PublicAuthN_IsUsernameAvailable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "available"}, "")) - pattern_AuthN_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"password", "reset"}, "")) + pattern_PublicAuthN_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_AuthN_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"password"}, "")) + pattern_PublicAuthN_RefreshSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_AuthN_ExpirePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "expire_password"}, "")) + pattern_PublicAuthN_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_AuthN_BeginOAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"oauth", "providerName"}, "")) + pattern_PublicAuthN_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"password", "reset"}, "")) - pattern_AuthN_OAuthReturn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"oauth", "providerName", "return"}, "")) + pattern_PublicAuthN_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"password"}, "")) - pattern_AuthN_ServiceConfiguration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"configuration"}, "")) + pattern_PublicAuthN_BeginOAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"oauth", "providerName"}, "")) - pattern_AuthN_JWKS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"jwks"}, "")) + pattern_PublicAuthN_OAuthReturn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"oauth", "providerName", "return"}, "")) - pattern_AuthN_ServiceStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"stats"}, "")) + pattern_PublicAuthN_ServiceConfiguration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"configuration"}, "")) - pattern_AuthN_ServerStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"metrics"}, "")) + pattern_PublicAuthN_JWKS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"jwks"}, "")) - pattern_AuthN_HealthCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"health"}, "")) + pattern_PublicAuthN_HealthCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"health"}, "")) ) var ( - forward_AuthN_Signup_0 = runtime.ForwardResponseMessage - - forward_AuthN_GetAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_UpdateAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_IsUsernameAvailable_0 = runtime.ForwardResponseMessage - - forward_AuthN_LockAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_UnlockAcount_0 = runtime.ForwardResponseMessage - - forward_AuthN_ArchiveAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_ImportAccount_0 = runtime.ForwardResponseMessage - - forward_AuthN_Login_0 = runtime.ForwardResponseMessage - - forward_AuthN_RefreshSession_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_Signup_0 = runtime.ForwardResponseMessage - forward_AuthN_Logout_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_IsUsernameAvailable_0 = runtime.ForwardResponseMessage - forward_AuthN_RequestPasswordReset_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_Login_0 = runtime.ForwardResponseMessage - forward_AuthN_ChangePassword_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_RefreshSession_0 = runtime.ForwardResponseMessage - forward_AuthN_ExpirePassword_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_Logout_0 = runtime.ForwardResponseMessage - forward_AuthN_BeginOAuth_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_RequestPasswordReset_0 = runtime.ForwardResponseMessage - forward_AuthN_OAuthReturn_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_ChangePassword_0 = runtime.ForwardResponseMessage - forward_AuthN_ServiceConfiguration_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_BeginOAuth_0 = runtime.ForwardResponseMessage - forward_AuthN_JWKS_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_OAuthReturn_0 = runtime.ForwardResponseMessage - forward_AuthN_ServiceStats_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_ServiceConfiguration_0 = runtime.ForwardResponseMessage - forward_AuthN_ServerStats_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_JWKS_0 = runtime.ForwardResponseMessage - forward_AuthN_HealthCheck_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_HealthCheck_0 = runtime.ForwardResponseMessage ) diff --git a/grpc/authn.pb_test.go b/grpc/authn.pb_test.go index 78dadc4e45..367f9ca1bd 100644 --- a/grpc/authn.pb_test.go +++ b/grpc/authn.pb_test.go @@ -1,8 +1,48 @@ package grpc import ( + "context" + "log" + "net" + "runtime" "testing" + + "google.golang.org/grpc" ) func TestServer(t *testing.T) { + + addr := "localhost:0" + lis, err := net.Listen("tcp", addr) + if err != nil { + log.Fatalf("failed to initializa TCP listen: %v", err) + } + defer lis.Close() + srv := NewServer(lis, nil) + + ctx := context.Background() + go srv.RunGRPC(ctx) + + runtime.Gosched() + + cc, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) + if err != nil { + t.Logf("failed to dial: %s", err) + t.FailNow() + } + + client := NewPublicAuthNClient(cc) + + signupForm := &SignupRequest{ + Username: "cool-username", + Password: "supersecurepassword", + } + + res, signErr := client.Signup(ctx, signupForm) + if signErr != nil { + t.Logf("failed to call Signup: %s", signErr) + t.FailNow() + } + t.Logf("%s", res) + } diff --git a/grpc/authn.proto b/grpc/authn.proto index 85ca226128..94a6b4c72e 100644 --- a/grpc/authn.proto +++ b/grpc/authn.proto @@ -18,42 +18,12 @@ message SignupResponse { message SignupResponseEnvelope { SignupResponse result = 1; } -message GetAccountRequest { string id = 1; } - -message GetAccountResponse { - int64 id = 1; - string username = 2; - bool locked = 3; - bool deleted = 4; -} - -message GetAccountResponseEnvelope { GetAccountResponse result = 1; } - -message UpdateAccountRequest { - string id = 1; - string username = 2; -} message IsUsernameAvailableRequest { string username = 1; } message IsUsernameAvailableResponseEnvelope { bool result = 1 [ (gogoproto.jsontag) = "result" ]; } -message LockAccountRequest { string id = 1; } - -message UnlockAccountRequest { string id = 1; } - -message ArchiveAccountRequest { string id = 1; } - -message ImportAccountRequst { - string username = 1; - string password = 2; - bool locked = 3; -} -message ImportAccountResponse { int64 id = 1 [ (gogoproto.jsontag) = "id" ]; } - -message ImportAccountResponseEnvelope { ImportAccountResponse result = 1; } - message LoginRequest { string username = 1; string password = 2; @@ -67,7 +37,6 @@ message ChangePasswordRequest { string currentPassword = 3; } -message ExpirePasswordRequest { string id = 1; } message BeginOAuthRequest { string providerName = 1; @@ -86,7 +55,6 @@ message Configuration { repeated string claims_supported = 5; string jwks_uri = 6; } -message ServiceStatsResponse {} message HealthCheckResponse { bool http = 1; @@ -104,7 +72,7 @@ message Key { } message JWKSResponse { repeated Key keys = 1; } -service AuthN { +service PublicAuthN { rpc Signup(SignupRequest) returns (SignupResponseEnvelope) { option (google.api.http) = { @@ -113,19 +81,6 @@ service AuthN { }; } - rpc GetAccount(GetAccountRequest) returns (GetAccountResponseEnvelope) { - option (google.api.http) = { - get : "/accounts/{id}", - }; - } - - rpc UpdateAccount(UpdateAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - put : "/accounts/{id}", - body : "username" - }; - } - rpc IsUsernameAvailable(IsUsernameAvailableRequest) returns (IsUsernameAvailableResponseEnvelope) { option (google.api.http) = { @@ -133,35 +88,7 @@ service AuthN { }; } - rpc LockAccount(LockAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - put : "/accounts/{id}/lock" - }; - } - - rpc UnlockAcount(UnlockAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - put : "/accounts/{id}/unlock" - }; - } - - rpc ArchiveAccount(ArchiveAccountRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete : "/accounts/{id}" - }; - } - - rpc ImportAccount(ImportAccountRequst) - returns (ImportAccountResponseEnvelope) { - - option (google.api.http) = { - post : "/accounts/import", - body : "*" - }; - } - rpc Login(LoginRequest) returns (SignupResponse) { - option (google.api.http) = { post : "/session", body : "*" @@ -169,14 +96,12 @@ service AuthN { } rpc RefreshSession(google.protobuf.Empty) returns (SignupResponse) { - option (google.api.http) = { get : "/session" }; } rpc Logout(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { delete : "/session" }; @@ -196,12 +121,6 @@ service AuthN { }; } - rpc ExpirePassword(ExpirePasswordRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - put : "/accounts/{id}/expire_password" - }; - } - rpc BeginOAuth(BeginOAuthRequest) returns (BeginOAuthResponse) { option (google.api.http) = { get : "/oauth/{providerName}" @@ -226,18 +145,6 @@ service AuthN { }; } - rpc ServiceStats(google.protobuf.Empty) returns (ServiceStatsResponse) { - option (google.api.http) = { - get : "/stats" - }; - } - - rpc ServerStats(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { - get : "/metrics" - }; - } - rpc HealthCheck(google.protobuf.Empty) returns (HealthCheckResponse) { option (google.api.http) = { get : "/health" From fa6efdecb036e48a5b0b7152a258bc923a17bab0 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Fri, 14 Dec 2018 18:33:54 +0300 Subject: [PATCH 3/7] Fix response message type for Login, RefreshSession, and ChangePassword --- grpc/authn.pb.go | 202 +++++++++++++++++++++++------------------------ grpc/authn.proto | 6 +- 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/grpc/authn.pb.go b/grpc/authn.pb.go index fcaf049c14..ef396dad71 100644 --- a/grpc/authn.pb.go +++ b/grpc/authn.pb.go @@ -41,7 +41,7 @@ type SignupRequest struct { func (m *SignupRequest) Reset() { *m = SignupRequest{} } func (*SignupRequest) ProtoMessage() {} func (*SignupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{0} + return fileDescriptor_authn_56eb0b3737c73835, []int{0} } func (m *SignupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ type SignupResponse struct { func (m *SignupResponse) Reset() { *m = SignupResponse{} } func (*SignupResponse) ProtoMessage() {} func (*SignupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{1} + return fileDescriptor_authn_56eb0b3737c73835, []int{1} } func (m *SignupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -138,7 +138,7 @@ type SignupResponseEnvelope struct { func (m *SignupResponseEnvelope) Reset() { *m = SignupResponseEnvelope{} } func (*SignupResponseEnvelope) ProtoMessage() {} func (*SignupResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{2} + return fileDescriptor_authn_56eb0b3737c73835, []int{2} } func (m *SignupResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,7 +183,7 @@ type IsUsernameAvailableRequest struct { func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } func (*IsUsernameAvailableRequest) ProtoMessage() {} func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{3} + return fileDescriptor_authn_56eb0b3737c73835, []int{3} } func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -228,7 +228,7 @@ type IsUsernameAvailableResponseEnvelope struct { func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{4} + return fileDescriptor_authn_56eb0b3737c73835, []int{4} } func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ type LoginRequest struct { func (m *LoginRequest) Reset() { *m = LoginRequest{} } func (*LoginRequest) ProtoMessage() {} func (*LoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{5} + return fileDescriptor_authn_56eb0b3737c73835, []int{5} } func (m *LoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ type PasswordResetRequest struct { func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } func (*PasswordResetRequest) ProtoMessage() {} func (*PasswordResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{6} + return fileDescriptor_authn_56eb0b3737c73835, []int{6} } func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -373,7 +373,7 @@ type ChangePasswordRequest struct { func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } func (*ChangePasswordRequest) ProtoMessage() {} func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{7} + return fileDescriptor_authn_56eb0b3737c73835, []int{7} } func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -433,7 +433,7 @@ type BeginOAuthRequest struct { func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } func (*BeginOAuthRequest) ProtoMessage() {} func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{8} + return fileDescriptor_authn_56eb0b3737c73835, []int{8} } func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -485,7 +485,7 @@ type BeginOAuthResponse struct { func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } func (*BeginOAuthResponse) ProtoMessage() {} func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{9} + return fileDescriptor_authn_56eb0b3737c73835, []int{9} } func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -530,7 +530,7 @@ type OAuthReturnRequest struct { func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } func (*OAuthReturnRequest) ProtoMessage() {} func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{10} + return fileDescriptor_authn_56eb0b3737c73835, []int{10} } func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -575,7 +575,7 @@ type OAuthReturnResponse struct { func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } func (*OAuthReturnResponse) ProtoMessage() {} func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{11} + return fileDescriptor_authn_56eb0b3737c73835, []int{11} } func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -625,7 +625,7 @@ type Configuration struct { func (m *Configuration) Reset() { *m = Configuration{} } func (*Configuration) ProtoMessage() {} func (*Configuration) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{12} + return fileDescriptor_authn_56eb0b3737c73835, []int{12} } func (m *Configuration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -707,7 +707,7 @@ type HealthCheckResponse struct { func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } func (*HealthCheckResponse) ProtoMessage() {} func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{13} + return fileDescriptor_authn_56eb0b3737c73835, []int{13} } func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -771,7 +771,7 @@ type Key struct { func (m *Key) Reset() { *m = Key{} } func (*Key) ProtoMessage() {} func (*Key) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{14} + return fileDescriptor_authn_56eb0b3737c73835, []int{14} } func (m *Key) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -851,7 +851,7 @@ type JWKSResponse struct { func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } func (*JWKSResponse) ProtoMessage() {} func (*JWKSResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_44d0ba90dadea045, []int{15} + return fileDescriptor_authn_56eb0b3737c73835, []int{15} } func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1574,11 +1574,11 @@ const _ = grpc.SupportPackageIsVersion4 type PublicAuthNClient interface { Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) - Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) - RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) + Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) + RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) - ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) + ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) @@ -1612,8 +1612,8 @@ func (c *publicAuthNClient) IsUsernameAvailable(ctx context.Context, in *IsUsern return out, nil } -func (c *publicAuthNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) +func (c *publicAuthNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { + out := new(SignupResponseEnvelope) err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Login", in, out, opts...) if err != nil { return nil, err @@ -1621,8 +1621,8 @@ func (c *publicAuthNClient) Login(ctx context.Context, in *LoginRequest, opts .. return out, nil } -func (c *publicAuthNClient) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) +func (c *publicAuthNClient) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { + out := new(SignupResponseEnvelope) err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RefreshSession", in, out, opts...) if err != nil { return nil, err @@ -1648,8 +1648,8 @@ func (c *publicAuthNClient) RequestPasswordReset(ctx context.Context, in *Passwo return out, nil } -func (c *publicAuthNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponse, error) { - out := new(SignupResponse) +func (c *publicAuthNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { + out := new(SignupResponseEnvelope) err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/ChangePassword", in, out, opts...) if err != nil { return nil, err @@ -1706,11 +1706,11 @@ func (c *publicAuthNClient) HealthCheck(ctx context.Context, in *types.Empty, op type PublicAuthNServer interface { Signup(context.Context, *SignupRequest) (*SignupResponseEnvelope, error) IsUsernameAvailable(context.Context, *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) - Login(context.Context, *LoginRequest) (*SignupResponse, error) - RefreshSession(context.Context, *types.Empty) (*SignupResponse, error) + Login(context.Context, *LoginRequest) (*SignupResponseEnvelope, error) + RefreshSession(context.Context, *types.Empty) (*SignupResponseEnvelope, error) Logout(context.Context, *types.Empty) (*types.Empty, error) RequestPasswordReset(context.Context, *PasswordResetRequest) (*types.Empty, error) - ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponse, error) + ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponseEnvelope, error) BeginOAuth(context.Context, *BeginOAuthRequest) (*BeginOAuthResponse, error) OAuthReturn(context.Context, *OAuthReturnRequest) (*OAuthReturnResponse, error) ServiceConfiguration(context.Context, *types.Empty) (*Configuration, error) @@ -4827,77 +4827,77 @@ var ( ErrIntOverflowAuthn = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_44d0ba90dadea045) } - -var fileDescriptor_authn_44d0ba90dadea045 = []byte{ - // 1103 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0xc6, 0x89, 0xe3, 0xbc, 0x4e, 0x9c, 0x74, 0xec, 0x24, 0xae, 0xdb, 0x6e, 0xa3, 0x05, - 0x44, 0x5a, 0x51, 0x2f, 0x04, 0x09, 0x15, 0x6e, 0x49, 0xd4, 0x40, 0x9a, 0xaa, 0x49, 0xd7, 0x0d, - 0xa8, 0x20, 0x61, 0xad, 0xd7, 0x93, 0xf5, 0x34, 0x9b, 0x9d, 0x65, 0x67, 0x36, 0x95, 0x85, 0x10, - 0x88, 0x5f, 0x80, 0xc4, 0x9f, 0xe0, 0xc8, 0x8f, 0xe0, 0xc0, 0xb1, 0x12, 0x17, 0x4e, 0x15, 0x31, - 0x1c, 0x50, 0x4f, 0xfd, 0x09, 0x68, 0x3e, 0x76, 0xed, 0x4d, 0x6c, 0x54, 0xc4, 0x6d, 0xde, 0xaf, - 0xe7, 0xfd, 0x98, 0x77, 0x9e, 0x5d, 0x28, 0xbb, 0x09, 0xef, 0x85, 0xcd, 0x28, 0xa6, 0x9c, 0xa2, - 0x19, 0x3f, 0x8e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0x3d, 0x87, 0x31, 0x4c, 0x68, 0x2d, 0x49, 0xc0, 0x79, 0x34, 0x67, 0xf7, 0xa4, 0x75, 0x7b, 0xf3, - 0xf9, 0xb9, 0x39, 0xf5, 0xfb, 0xb9, 0x39, 0xf5, 0xea, 0xdc, 0x34, 0xbe, 0x1b, 0x98, 0xc6, 0x4f, - 0x03, 0xd3, 0xf8, 0x75, 0x60, 0x1a, 0xcf, 0x07, 0xa6, 0xf1, 0xc7, 0xc0, 0x34, 0xfe, 0x1e, 0x98, - 0x53, 0xaf, 0x06, 0xa6, 0xf1, 0xc3, 0x9f, 0xe6, 0xd4, 0xe7, 0xf2, 0xf7, 0xb1, 0x53, 0x94, 0xf9, - 0xde, 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0x41, 0x76, 0xd1, 0x84, 0x5a, 0x0a, 0x00, 0x00, +func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_56eb0b3737c73835) } + +var fileDescriptor_authn_56eb0b3737c73835 = []byte{ + // 1100 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5d, 0x6f, 0xdb, 0x54, + 0x18, 0xae, 0x9b, 0x36, 0x4d, 0xdf, 0xb4, 0x69, 0x77, 0x92, 0xb6, 0x59, 0xb6, 0x79, 0x95, 0x01, + 0xd1, 0x4d, 0x2c, 0x86, 0x22, 0xa1, 0xc1, 0x5d, 0x3b, 0x6d, 0xd0, 0x75, 0x6a, 0x37, 0x67, 0xe5, + 0x53, 0x22, 0x72, 0x9c, 0x53, 0xe7, 0xac, 0xae, 0x8f, 0xf1, 0x39, 0xee, 0x14, 0x21, 0x04, 0xe2, + 0x17, 0x20, 0xf1, 0x27, 0xb8, 0xe4, 0x67, 0x70, 0x39, 0x89, 0x1b, 0x2e, 0xd0, 0x44, 0x03, 0x17, + 0x68, 0x57, 0xfb, 0x09, 0xe8, 0x7c, 0xd8, 0x89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, 0x3c, 0x0d, 0x8b, 0x77, 0x68, 0x78, 0x48, 0xfc, 0x24, 0x96, 0x8f, 0x0a, 0xad, + 0x42, 0x91, 0x30, 0x96, 0x64, 0x85, 0x69, 0x09, 0xdd, 0x86, 0x7a, 0xac, 0x11, 0xdb, 0xbc, 0x1f, + 0x61, 0xd6, 0x66, 0x49, 0x14, 0xd1, 0x98, 0x63, 0x71, 0xf1, 0x85, 0x8d, 0x79, 0x67, 0x35, 0xb5, + 0x3f, 0x16, 0xe6, 0x56, 0x6a, 0x45, 0xef, 0xc1, 0x1a, 0x4b, 0x3a, 0x4f, 0xb0, 0xc7, 0xcf, 0x05, + 0x16, 0x64, 0xe0, 0x8a, 0x36, 0x9f, 0x89, 0xdb, 0x87, 0x37, 0xd2, 0x87, 0xd6, 0x66, 0xc4, 0x0f, + 0x49, 0xe8, 0xb7, 0xdd, 0xc0, 0x6f, 0x9f, 0xb8, 0x41, 0x92, 0x43, 0x99, 0x91, 0x28, 0xeb, 0xfa, + 0x2d, 0xb6, 0x94, 0xeb, 0x56, 0xe0, 0x7f, 0x2c, 0x1d, 0x87, 0x80, 0x37, 0x60, 0xd9, 0x0b, 0x5c, + 0x72, 0x3c, 0x1a, 0x3b, 0x2b, 0x63, 0x97, 0x94, 0x7e, 0xe8, 0x7a, 0x19, 0x4a, 0x4f, 0x9e, 0x1e, + 0xb1, 0x76, 0x12, 0x93, 0x7a, 0x51, 0xce, 0x61, 0x4e, 0xc8, 0x07, 0x31, 0xb1, 0xf6, 0xa1, 0xfa, + 0x11, 0x76, 0x03, 0xde, 0xbb, 0xd3, 0xc3, 0xde, 0x51, 0x36, 0x65, 0x04, 0x33, 0x3d, 0xce, 0x23, + 0xf5, 0xac, 0x1c, 0x79, 0x46, 0x15, 0x98, 0xee, 0x76, 0xe4, 0x56, 0x94, 0x9c, 0xe9, 0x6e, 0x47, + 0xec, 0xa9, 0x98, 0x3c, 0x93, 0x7b, 0x58, 0x72, 0x94, 0x60, 0x11, 0x28, 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 0xa6, 0x77, 0x7f, 0x94, 0x1b, 0xac, 0x45, 0x89, 0x35, + 0x87, 0x66, 0x6d, 0xc1, 0x7c, 0xe8, 0x11, 0x94, 0x47, 0x68, 0x6f, 0x22, 0x92, 0x9e, 0xc3, 0x18, + 0x86, 0xb4, 0x96, 0x24, 0xe0, 0x3c, 0x9a, 0xb3, 0x7b, 0xd2, 0xba, 0xbd, 0xf9, 0xec, 0xd4, 0x9c, + 0xfa, 0xed, 0xd4, 0x9c, 0x7a, 0x79, 0x6a, 0x1a, 0xdf, 0x0d, 0x4c, 0xe3, 0xa7, 0x81, 0x69, 0xfc, + 0x32, 0x30, 0x8d, 0x67, 0x03, 0xd3, 0xf8, 0x63, 0x60, 0x1a, 0x7f, 0x0f, 0xcc, 0xa9, 0x97, 0x03, + 0xd3, 0xf8, 0xe1, 0x4f, 0x73, 0xea, 0x73, 0xf9, 0x5b, 0xd9, 0x29, 0xca, 0x7c, 0xef, 0xfe, 0x13, + 0x00, 0x00, 0xff, 0xff, 0x81, 0xcf, 0x1c, 0xe9, 0x72, 0x0a, 0x00, 0x00, } diff --git a/grpc/authn.proto b/grpc/authn.proto index 94a6b4c72e..e9442cdd9b 100644 --- a/grpc/authn.proto +++ b/grpc/authn.proto @@ -88,14 +88,14 @@ service PublicAuthN { }; } - rpc Login(LoginRequest) returns (SignupResponse) { + rpc Login(LoginRequest) returns (SignupResponseEnvelope) { option (google.api.http) = { post : "/session", body : "*" }; } - rpc RefreshSession(google.protobuf.Empty) returns (SignupResponse) { + rpc RefreshSession(google.protobuf.Empty) returns (SignupResponseEnvelope) { option (google.api.http) = { get : "/session" }; @@ -114,7 +114,7 @@ service PublicAuthN { }; } - rpc ChangePassword(ChangePasswordRequest) returns (SignupResponse) { + rpc ChangePassword(ChangePasswordRequest) returns (SignupResponseEnvelope) { option (google.api.http) = { post : "/password", body : "*" From 9514aa76804de8d97752bb5d88f757b6081e26f1 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 15 Dec 2018 12:02:24 +0300 Subject: [PATCH 4/7] Add passwordless API in protobuf definition --- grpc/authn.pb.go | 655 ++++++++++++++++++++++++++++++++++++++------ grpc/authn.pb.gw.go | 78 ++++++ grpc/authn.proto | 21 ++ 3 files changed, 665 insertions(+), 89 deletions(-) diff --git a/grpc/authn.pb.go b/grpc/authn.pb.go index ef396dad71..485977bc98 100644 --- a/grpc/authn.pb.go +++ b/grpc/authn.pb.go @@ -41,7 +41,7 @@ type SignupRequest struct { func (m *SignupRequest) Reset() { *m = SignupRequest{} } func (*SignupRequest) ProtoMessage() {} func (*SignupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{0} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{0} } func (m *SignupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ type SignupResponse struct { func (m *SignupResponse) Reset() { *m = SignupResponse{} } func (*SignupResponse) ProtoMessage() {} func (*SignupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{1} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{1} } func (m *SignupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -138,7 +138,7 @@ type SignupResponseEnvelope struct { func (m *SignupResponseEnvelope) Reset() { *m = SignupResponseEnvelope{} } func (*SignupResponseEnvelope) ProtoMessage() {} func (*SignupResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{2} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{2} } func (m *SignupResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,7 +183,7 @@ type IsUsernameAvailableRequest struct { func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } func (*IsUsernameAvailableRequest) ProtoMessage() {} func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{3} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{3} } func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -228,7 +228,7 @@ type IsUsernameAvailableResponseEnvelope struct { func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{4} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{4} } func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ type LoginRequest struct { func (m *LoginRequest) Reset() { *m = LoginRequest{} } func (*LoginRequest) ProtoMessage() {} func (*LoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{5} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{5} } func (m *LoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -317,6 +317,96 @@ func (m *LoginRequest) GetPassword() string { return "" } +type RequestPasswordlessLoginRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestPasswordlessLoginRequest) Reset() { *m = RequestPasswordlessLoginRequest{} } +func (*RequestPasswordlessLoginRequest) ProtoMessage() {} +func (*RequestPasswordlessLoginRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{6} +} +func (m *RequestPasswordlessLoginRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestPasswordlessLoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestPasswordlessLoginRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RequestPasswordlessLoginRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestPasswordlessLoginRequest.Merge(dst, src) +} +func (m *RequestPasswordlessLoginRequest) XXX_Size() int { + return m.Size() +} +func (m *RequestPasswordlessLoginRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RequestPasswordlessLoginRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestPasswordlessLoginRequest proto.InternalMessageInfo + +func (m *RequestPasswordlessLoginRequest) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type SubmitPasswordlessLoginRequest struct { + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubmitPasswordlessLoginRequest) Reset() { *m = SubmitPasswordlessLoginRequest{} } +func (*SubmitPasswordlessLoginRequest) ProtoMessage() {} +func (*SubmitPasswordlessLoginRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{7} +} +func (m *SubmitPasswordlessLoginRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubmitPasswordlessLoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubmitPasswordlessLoginRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SubmitPasswordlessLoginRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubmitPasswordlessLoginRequest.Merge(dst, src) +} +func (m *SubmitPasswordlessLoginRequest) XXX_Size() int { + return m.Size() +} +func (m *SubmitPasswordlessLoginRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubmitPasswordlessLoginRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubmitPasswordlessLoginRequest proto.InternalMessageInfo + +func (m *SubmitPasswordlessLoginRequest) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + type PasswordResetRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -326,7 +416,7 @@ type PasswordResetRequest struct { func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } func (*PasswordResetRequest) ProtoMessage() {} func (*PasswordResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{6} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{8} } func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -373,7 +463,7 @@ type ChangePasswordRequest struct { func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } func (*ChangePasswordRequest) ProtoMessage() {} func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{7} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{9} } func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -433,7 +523,7 @@ type BeginOAuthRequest struct { func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } func (*BeginOAuthRequest) ProtoMessage() {} func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{8} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{10} } func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -485,7 +575,7 @@ type BeginOAuthResponse struct { func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } func (*BeginOAuthResponse) ProtoMessage() {} func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{9} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{11} } func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -530,7 +620,7 @@ type OAuthReturnRequest struct { func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } func (*OAuthReturnRequest) ProtoMessage() {} func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{10} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{12} } func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -575,7 +665,7 @@ type OAuthReturnResponse struct { func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } func (*OAuthReturnResponse) ProtoMessage() {} func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{11} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{13} } func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -625,7 +715,7 @@ type Configuration struct { func (m *Configuration) Reset() { *m = Configuration{} } func (*Configuration) ProtoMessage() {} func (*Configuration) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{12} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{14} } func (m *Configuration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -707,7 +797,7 @@ type HealthCheckResponse struct { func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } func (*HealthCheckResponse) ProtoMessage() {} func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{13} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{15} } func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -771,7 +861,7 @@ type Key struct { func (m *Key) Reset() { *m = Key{} } func (*Key) ProtoMessage() {} func (*Key) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{14} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{16} } func (m *Key) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -851,7 +941,7 @@ type JWKSResponse struct { func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } func (*JWKSResponse) ProtoMessage() {} func (*JWKSResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_56eb0b3737c73835, []int{15} + return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{17} } func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -894,6 +984,8 @@ func init() { proto.RegisterType((*IsUsernameAvailableRequest)(nil), "grpc.IsUsernameAvailableRequest") proto.RegisterType((*IsUsernameAvailableResponseEnvelope)(nil), "grpc.IsUsernameAvailableResponseEnvelope") proto.RegisterType((*LoginRequest)(nil), "grpc.LoginRequest") + proto.RegisterType((*RequestPasswordlessLoginRequest)(nil), "grpc.RequestPasswordlessLoginRequest") + proto.RegisterType((*SubmitPasswordlessLoginRequest)(nil), "grpc.SubmitPasswordlessLoginRequest") proto.RegisterType((*PasswordResetRequest)(nil), "grpc.PasswordResetRequest") proto.RegisterType((*ChangePasswordRequest)(nil), "grpc.ChangePasswordRequest") proto.RegisterType((*BeginOAuthRequest)(nil), "grpc.BeginOAuthRequest") @@ -1055,6 +1147,54 @@ func (this *LoginRequest) Equal(that interface{}) bool { } return true } +func (this *RequestPasswordlessLoginRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RequestPasswordlessLoginRequest) + if !ok { + that2, ok := that.(RequestPasswordlessLoginRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Username != that1.Username { + return false + } + return true +} +func (this *SubmitPasswordlessLoginRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SubmitPasswordlessLoginRequest) + if !ok { + that2, ok := that.(SubmitPasswordlessLoginRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Token != that1.Token { + return false + } + return true +} func (this *PasswordResetRequest) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1434,6 +1574,26 @@ func (this *LoginRequest) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *RequestPasswordlessLoginRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.RequestPasswordlessLoginRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SubmitPasswordlessLoginRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.SubmitPasswordlessLoginRequest{") + s = append(s, "Token: "+fmt.Sprintf("%#v", this.Token)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func (this *PasswordResetRequest) GoString() string { if this == nil { return "nil" @@ -1577,6 +1737,8 @@ type PublicAuthNClient interface { Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) + RequestPasswordlessLogin(ctx context.Context, in *RequestPasswordlessLoginRequest, opts ...grpc.CallOption) (*types.Empty, error) + SubmitPasswordlessLogin(ctx context.Context, in *SubmitPasswordlessLoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) @@ -1639,6 +1801,24 @@ func (c *publicAuthNClient) Logout(ctx context.Context, in *types.Empty, opts .. return out, nil } +func (c *publicAuthNClient) RequestPasswordlessLogin(ctx context.Context, in *RequestPasswordlessLoginRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RequestPasswordlessLogin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *publicAuthNClient) SubmitPasswordlessLogin(ctx context.Context, in *SubmitPasswordlessLoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { + out := new(SignupResponseEnvelope) + err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/SubmitPasswordlessLogin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *publicAuthNClient) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) { out := new(types.Empty) err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RequestPasswordReset", in, out, opts...) @@ -1709,6 +1889,8 @@ type PublicAuthNServer interface { Login(context.Context, *LoginRequest) (*SignupResponseEnvelope, error) RefreshSession(context.Context, *types.Empty) (*SignupResponseEnvelope, error) Logout(context.Context, *types.Empty) (*types.Empty, error) + RequestPasswordlessLogin(context.Context, *RequestPasswordlessLoginRequest) (*types.Empty, error) + SubmitPasswordlessLogin(context.Context, *SubmitPasswordlessLoginRequest) (*SignupResponseEnvelope, error) RequestPasswordReset(context.Context, *PasswordResetRequest) (*types.Empty, error) ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponseEnvelope, error) BeginOAuth(context.Context, *BeginOAuthRequest) (*BeginOAuthResponse, error) @@ -1812,6 +1994,42 @@ func _PublicAuthN_Logout_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _PublicAuthN_RequestPasswordlessLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestPasswordlessLoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublicAuthNServer).RequestPasswordlessLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/RequestPasswordlessLogin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).RequestPasswordlessLogin(ctx, req.(*RequestPasswordlessLoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PublicAuthN_SubmitPasswordlessLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubmitPasswordlessLoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublicAuthNServer).SubmitPasswordlessLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.PublicAuthN/SubmitPasswordlessLogin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublicAuthNServer).SubmitPasswordlessLogin(ctx, req.(*SubmitPasswordlessLoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _PublicAuthN_RequestPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PasswordResetRequest) if err := dec(in); err != nil { @@ -1962,6 +2180,14 @@ var _PublicAuthN_serviceDesc = grpc.ServiceDesc{ MethodName: "Logout", Handler: _PublicAuthN_Logout_Handler, }, + { + MethodName: "RequestPasswordlessLogin", + Handler: _PublicAuthN_RequestPasswordlessLogin_Handler, + }, + { + MethodName: "SubmitPasswordlessLogin", + Handler: _PublicAuthN_SubmitPasswordlessLogin_Handler, + }, { MethodName: "RequestPasswordReset", Handler: _PublicAuthN_RequestPasswordReset_Handler, @@ -2159,6 +2385,54 @@ func (m *LoginRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *RequestPasswordlessLoginRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestPasswordlessLoginRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *SubmitPasswordlessLoginRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubmitPasswordlessLoginRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Token) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) + i += copy(dAtA[i:], m.Token) + } + return i, nil +} + func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2628,6 +2902,26 @@ func (m *LoginRequest) Size() (n int) { return n } +func (m *RequestPasswordlessLoginRequest) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + +func (m *SubmitPasswordlessLoginRequest) Size() (n int) { + var l int + _ = l + l = len(m.Token) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) + } + return n +} + func (m *PasswordResetRequest) Size() (n int) { var l int _ = l @@ -2872,6 +3166,26 @@ func (this *LoginRequest) String() string { }, "") return s } +func (this *RequestPasswordlessLoginRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RequestPasswordlessLoginRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *SubmitPasswordlessLoginRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SubmitPasswordlessLoginRequest{`, + `Token:` + fmt.Sprintf("%v", this.Token) + `,`, + `}`, + }, "") + return s +} func (this *PasswordResetRequest) String() string { if this == nil { return "nil" @@ -3522,6 +3836,164 @@ func (m *LoginRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *RequestPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestPasswordlessLoginRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestPasswordlessLoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubmitPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubmitPasswordlessLoginRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubmitPasswordlessLoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *PasswordResetRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4827,77 +5299,82 @@ var ( ErrIntOverflowAuthn = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_56eb0b3737c73835) } - -var fileDescriptor_authn_56eb0b3737c73835 = []byte{ - // 1100 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00,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{ proto.RegisterFile("authn.proto", fileDescriptor_authn_1d9e4c9a3e1162b3) } + +var fileDescriptor_authn_1d9e4c9a3e1162b3 = []byte{ + // 1173 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x4e, 0x1b, 0xd7, + 0x17, 0x67, 0x6c, 0x30, 0xe6, 0x18, 0x0c, 0xb9, 0x36, 0xe0, 0x38, 0x64, 0x40, 0xf7, 0x9f, 0xe8, + 0x4f, 0xa2, 0xc6, 0xd3, 0x52, 0x29, 0xa2, 0x95, 0xba, 0x00, 0x94, 0xb4, 0x84, 0x08, 0x92, 0x71, + 0xe8, 0xa7, 0x54, 0x6b, 0x3c, 0xbe, 0x8c, 0x6f, 0x18, 0x66, 0x26, 0x73, 0x67, 0x48, 0xad, 0xaa, + 0x6a, 0xd5, 0x27, 0xa8, 0xd4, 0x97, 0xe8, 0xb2, 0x8f, 0xd1, 0xee, 0x22, 0x75, 0xd3, 0x55, 0x54, + 0xdc, 0x2e, 0xaa, 0xac, 0xf2, 0x08, 0xd5, 0xfd, 0x98, 0xf1, 0x07, 0x76, 0xa0, 0xea, 0xee, 0x9e, + 0xaf, 0xdf, 0xef, 0x9c, 0xe3, 0x33, 0xe7, 0x18, 0x0a, 0x56, 0x1c, 0xb5, 0xbd, 0x5a, 0x10, 0xfa, + 0x91, 0x8f, 0x26, 0x9d, 0x30, 0xb0, 0xab, 0xd7, 0x1c, 0xdf, 0x77, 0x5c, 0x62, 0x08, 0x5d, 0x33, + 0x3e, 0x32, 0xc8, 0x49, 0x10, 0x75, 0xa4, 0x4b, 0xf5, 0x8e, 0x43, 0xa3, 0x76, 0xdc, 0xac, 0xd9, + 0xfe, 0x89, 0xe1, 0xf8, 0x8e, 0xdf, 0xf3, 0xe2, 0x92, 0x10, 0xc4, 0x4b, 0xb9, 0xaf, 0x28, 0x2c, + 0x2b, 0xa0, 0x86, 0xe5,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xf1, 0xd1, 0x65, 0x98, 0xea, 0xfb, 0x6d, + 0x4c, 0x29, 0xe0, 0x0d, 0x28, 0x27, 0x11, 0x26, 0x61, 0x24, 0xba, 0x0c, 0x17, 0x83, 0xc5, 0x9d, + 0xb6, 0xe5, 0x39, 0xa4, 0x17, 0x99, 0x06, 0xa5, 0xf5, 0x69, 0x83, 0xf5, 0xf5, 0xe8, 0x33, 0x7d, + 0xf4, 0x68, 0x1d, 0xe6, 0xed, 0x38, 0x0c, 0x89, 0x97, 0xe6, 0x5d, 0xc9, 0x0a, 0xfb, 0xb0, 0x1a, + 0x7f, 0x06, 0x57, 0xb6, 0x89, 0x43, 0xbd, 0x83, 0xad, 0x38, 0x6a, 0x27, 0x84, 0x18, 0x66, 0x83, + 0xd0, 0x3f, 0xa5, 0x2d, 0x12, 0xee, 0xf7, 0x32, 0x1d, 0xd0, 0xa1, 0x35, 0x28, 0x84, 0xa4, 0x45, + 0x43, 0x62, 0x47, 0x87, 0xe6, 0xae, 0xa2, 0xef, 0x57, 0xe1, 0xb7, 0x01, 0xf5, 0x43, 0xab, 0x71, + 0xe6, 0xc5, 0x28, 0x9c, 0xb4, 0x18, 0x25, 0xe3, 0x4d, 0x40, 0xca, 0x39, 0x8a, 0x43, 0xef, 0x5f, + 0x64, 0x83, 0xdf, 0x81, 0xd2, 0x40, 0x64, 0x8f, 0x2c, 0xc9, 0x28, 0x21, 0x4b, 0x64, 0xfc, 0x73, + 0x06, 0xe6, 0x76, 0x7c, 0xef, 0x88, 0x3a, 0x71, 0x28, 0xbe, 0x65, 0xb4, 0x04, 0x39, 0xca, 0x58, + 0x9c, 0x26, 0xa6, 0x24, 0xb4, 0x09, 0x95, 0x50, 0x21, 0x36, 0xa2, 0x4e, 0x40, 0x58, 0x83, 0xc5, + 0x41, 0xe0, 0x87, 0x11, 0xe1, 0xf3, 0x96, 0x5d, 0x9f, 0x31, 0x97, 0x12, 0xfb, 0x13, 0x6e, 0xae, + 0x27, 0x56, 0x74, 0x17, 0x96, 0x59, 0xdc, 0x7c, 0x4a, 0xec, 0xe8, 0x5c, 0x60, 0x56, 0x04, 0x2e, + 0x2a, 0xf3, 0x50, 0xdc, 0x01, 0xdc, 0x4c, 0xbe, 0xef, 0x06, 0xa3, 0x8e, 0x47, 0x3d, 0xa7, 0x61, + 0xb9, 0x4e, 0xe3, 0xd4, 0x72, 0xe3, 0x01, 0x94, 0x49, 0x81, 0xb2, 0xa6, 0x56, 0x40, 0x5d, 0xba, + 0x6e, 0xb9, 0xce, 0xc7, 0xc2, 0xb1, 0x07, 0x78, 0x0b, 0x16, 0x6c, 0xd7, 0xa2, 0x27, 0xfd, 0xb1, + 0x53, 0x22, 0x76, 0x5e, 0xea, 0x7b, 0xae, 0x57, 0x21, 0xff, 0xf4, 0xf9, 0x31, 0x6b, 0xc4, 0x21, + 0xad, 0xe4, 0x44, 0x1f, 0xa6, 0xb9, 0x7c, 0x18, 0x52, 0x7c, 0x00, 0xa5, 0x8f, 0x88, 0xe5, 0x46, + 0xed, 0x9d, 0x36, 0xb1, 0x8f, 0xd3, 0x2e, 0x23, 0x98, 0x6c, 0x47, 0x51, 0x20, 0xbf, 0x66, 0x53, + 0xbc, 0x51, 0x11, 0x32, 0xad, 0xa6, 0x98, 0x8a, 0xbc, 0x99, 0x69, 0x35, 0xf9, 0x9c, 0xf2, 0xce, + 0x33, 0x31, 0x87, 0x79, 0x53, 0x0a, 0x98, 0x42, 0x76, 0x8f, 0x74, 0xd0, 0x02, 0x64, 0x63, 0x96, + 0xfc, 0xb0, 0xfc, 0xc9, 0x35, 0x96, 0xeb, 0xa8, 0xee, 0xf2, 0x27, 0xd7, 0x1c, 0x47, 0x1d, 0x35, + 0xc6, 0xfc, 0x29, 0x34, 0x94, 0xb7, 0x40, 0x6a, 0x68, 0x0b, 0xcd, 0x82, 0x46, 0x2a, 0x53, 0x42, + 0xd6, 0x08, 0x97, 0x3c, 0x55, 0x81, 0xe6, 0xe1, 0x3b, 0x30, 0xfb, 0xe0,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xac, 0x69, 0x34, 0x65, 0xf0, 0x35, 0x8f, 0x1e, 0x43, + 0xa1, 0x6f, 0xc7, 0x8f, 0x45, 0x52, 0x7d, 0x18, 0x71, 0x0e, 0xf0, 0xbc, 0x00, 0x9c, 0x41, 0xd3, + 0x46, 0x5b, 0x58, 0xb7, 0x37, 0x5e, 0x9c, 0xe9, 0x13, 0xbf, 0x9f, 0xe9, 0x13, 0xaf, 0xcf, 0x74, + 0xed, 0xbb, 0xae, 0xae, 0xfd, 0xd4, 0xd5, 0xb5, 0x5f, 0xba, 0xba, 0xf6, 0xa2, 0xab, 0x6b, 0x7f, + 0x74, 0x75, 0xed, 0xef, 0xae, 0x3e, 0xf1, 0xba, 0xab, 0x6b, 0x3f, 0xfc, 0xa9, 0x4f, 0x7c, 0x2e, + 0xfe, 0xba, 0x37, 0x73, 0x82, 0xef, 0xdd, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xef, 0x13, + 0x8c, 0xd6, 0x0b, 0x00, 0x00, } diff --git a/grpc/authn.pb.gw.go b/grpc/authn.pb.gw.go index b2f6f61735..d612c425f7 100644 --- a/grpc/authn.pb.gw.go +++ b/grpc/authn.pb.gw.go @@ -90,6 +90,36 @@ func request_PublicAuthN_Logout_0(ctx context.Context, marshaler runtime.Marshal } +var ( + filter_PublicAuthN_RequestPasswordlessLogin_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_PublicAuthN_RequestPasswordlessLogin_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RequestPasswordlessLoginRequest + var metadata runtime.ServerMetadata + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_RequestPasswordlessLogin_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RequestPasswordlessLogin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_PublicAuthN_SubmitPasswordlessLogin_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitPasswordlessLoginRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SubmitPasswordlessLogin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + var ( filter_PublicAuthN_RequestPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -347,6 +377,46 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_PublicAuthN_RequestPasswordlessLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PublicAuthN_RequestPasswordlessLogin_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PublicAuthN_RequestPasswordlessLogin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_PublicAuthN_SubmitPasswordlessLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PublicAuthN_SubmitPasswordlessLogin_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PublicAuthN_SubmitPasswordlessLogin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_PublicAuthN_RequestPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -501,6 +571,10 @@ var ( pattern_PublicAuthN_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) + pattern_PublicAuthN_RequestPasswordlessLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"session", "token"}, "")) + + pattern_PublicAuthN_SubmitPasswordlessLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"session", "token"}, "")) + pattern_PublicAuthN_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"password", "reset"}, "")) pattern_PublicAuthN_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"password"}, "")) @@ -527,6 +601,10 @@ var ( forward_PublicAuthN_Logout_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_RequestPasswordlessLogin_0 = runtime.ForwardResponseMessage + + forward_PublicAuthN_SubmitPasswordlessLogin_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_RequestPasswordReset_0 = runtime.ForwardResponseMessage forward_PublicAuthN_ChangePassword_0 = runtime.ForwardResponseMessage diff --git a/grpc/authn.proto b/grpc/authn.proto index e9442cdd9b..a971e4e2a5 100644 --- a/grpc/authn.proto +++ b/grpc/authn.proto @@ -29,6 +29,14 @@ message LoginRequest { string password = 2; } +message RequestPasswordlessLoginRequest { + string username = 1; +} + +message SubmitPasswordlessLoginRequest { + string token = 1; +} + message PasswordResetRequest { string username = 1; } message ChangePasswordRequest { @@ -107,6 +115,19 @@ service PublicAuthN { }; } + rpc RequestPasswordlessLogin(RequestPasswordlessLoginRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + get : "/session/token" + }; + } + + rpc SubmitPasswordlessLogin(SubmitPasswordlessLoginRequest) returns (SignupResponseEnvelope) { + option (google.api.http) = { + post: "/session/token", + body : "*" + }; + } + rpc RequestPasswordReset(PasswordResetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { From ebd5638f9ad663fd997ca35b476f49a70f9521d6 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 15 Dec 2018 14:00:42 +0300 Subject: [PATCH 5/7] Correct Alg parameter in proto definition --- grpc/authn.pb.go | 228 ++++++++++++++++++++++------------------------- grpc/authn.proto | 2 +- 2 files changed, 107 insertions(+), 123 deletions(-) diff --git a/grpc/authn.pb.go b/grpc/authn.pb.go index 485977bc98..a1d609ca68 100644 --- a/grpc/authn.pb.go +++ b/grpc/authn.pb.go @@ -41,7 +41,7 @@ type SignupRequest struct { func (m *SignupRequest) Reset() { *m = SignupRequest{} } func (*SignupRequest) ProtoMessage() {} func (*SignupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{0} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{0} } func (m *SignupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ type SignupResponse struct { func (m *SignupResponse) Reset() { *m = SignupResponse{} } func (*SignupResponse) ProtoMessage() {} func (*SignupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{1} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{1} } func (m *SignupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -138,7 +138,7 @@ type SignupResponseEnvelope struct { func (m *SignupResponseEnvelope) Reset() { *m = SignupResponseEnvelope{} } func (*SignupResponseEnvelope) ProtoMessage() {} func (*SignupResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{2} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{2} } func (m *SignupResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,7 +183,7 @@ type IsUsernameAvailableRequest struct { func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } func (*IsUsernameAvailableRequest) ProtoMessage() {} func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{3} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{3} } func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -228,7 +228,7 @@ type IsUsernameAvailableResponseEnvelope struct { func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{4} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{4} } func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ type LoginRequest struct { func (m *LoginRequest) Reset() { *m = LoginRequest{} } func (*LoginRequest) ProtoMessage() {} func (*LoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{5} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{5} } func (m *LoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ type RequestPasswordlessLoginRequest struct { func (m *RequestPasswordlessLoginRequest) Reset() { *m = RequestPasswordlessLoginRequest{} } func (*RequestPasswordlessLoginRequest) ProtoMessage() {} func (*RequestPasswordlessLoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{6} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{6} } func (m *RequestPasswordlessLoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -371,7 +371,7 @@ type SubmitPasswordlessLoginRequest struct { func (m *SubmitPasswordlessLoginRequest) Reset() { *m = SubmitPasswordlessLoginRequest{} } func (*SubmitPasswordlessLoginRequest) ProtoMessage() {} func (*SubmitPasswordlessLoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{7} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{7} } func (m *SubmitPasswordlessLoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ type PasswordResetRequest struct { func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } func (*PasswordResetRequest) ProtoMessage() {} func (*PasswordResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{8} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{8} } func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -463,7 +463,7 @@ type ChangePasswordRequest struct { func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } func (*ChangePasswordRequest) ProtoMessage() {} func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{9} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{9} } func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -523,7 +523,7 @@ type BeginOAuthRequest struct { func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } func (*BeginOAuthRequest) ProtoMessage() {} func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{10} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{10} } func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -575,7 +575,7 @@ type BeginOAuthResponse struct { func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } func (*BeginOAuthResponse) ProtoMessage() {} func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{11} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{11} } func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -620,7 +620,7 @@ type OAuthReturnRequest struct { func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } func (*OAuthReturnRequest) ProtoMessage() {} func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{12} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{12} } func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -665,7 +665,7 @@ type OAuthReturnResponse struct { func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } func (*OAuthReturnResponse) ProtoMessage() {} func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{13} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{13} } func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -715,7 +715,7 @@ type Configuration struct { func (m *Configuration) Reset() { *m = Configuration{} } func (*Configuration) ProtoMessage() {} func (*Configuration) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{14} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{14} } func (m *Configuration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -797,7 +797,7 @@ type HealthCheckResponse struct { func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } func (*HealthCheckResponse) ProtoMessage() {} func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{15} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{15} } func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -849,7 +849,7 @@ func (m *HealthCheckResponse) GetRedis() bool { type Key struct { Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` - Alg []string `protobuf:"bytes,2,rep,name=alg" json:"alg,omitempty"` + Alg string `protobuf:"bytes,2,opt,name=alg,proto3" json:"alg,omitempty"` Kty string `protobuf:"bytes,3,opt,name=kty,proto3" json:"kty,omitempty"` Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` @@ -861,7 +861,7 @@ type Key struct { func (m *Key) Reset() { *m = Key{} } func (*Key) ProtoMessage() {} func (*Key) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{16} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{16} } func (m *Key) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -897,11 +897,11 @@ func (m *Key) GetUse() string { return "" } -func (m *Key) GetAlg() []string { +func (m *Key) GetAlg() string { if m != nil { return m.Alg } - return nil + return "" } func (m *Key) GetKty() string { @@ -941,7 +941,7 @@ type JWKSResponse struct { func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } func (*JWKSResponse) ProtoMessage() {} func (*JWKSResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_1d9e4c9a3e1162b3, []int{17} + return fileDescriptor_authn_75e9d4eb00e36a41, []int{17} } func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1459,14 +1459,9 @@ func (this *Key) Equal(that interface{}) bool { if this.Use != that1.Use { return false } - if len(this.Alg) != len(that1.Alg) { + if this.Alg != that1.Alg { return false } - for i := range this.Alg { - if this.Alg[i] != that1.Alg[i] { - return false - } - } if this.Kty != that1.Kty { return false } @@ -2755,19 +2750,10 @@ func (m *Key) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], m.Use) } if len(m.Alg) > 0 { - for _, s := range m.Alg { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Alg))) + i += copy(dAtA[i:], m.Alg) } if len(m.Kty) > 0 { dAtA[i] = 0x1a @@ -3054,11 +3040,9 @@ func (m *Key) Size() (n int) { if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } - if len(m.Alg) > 0 { - for _, s := range m.Alg { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } + l = len(m.Alg) + if l > 0 { + n += 1 + l + sovAuthn(uint64(l)) } l = len(m.Kty) if l > 0 { @@ -4974,7 +4958,7 @@ func (m *Key) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Alg = append(m.Alg, string(dAtA[iNdEx:postIndex])) + m.Alg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -5299,82 +5283,82 @@ var ( ErrIntOverflowAuthn = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_1d9e4c9a3e1162b3) } +func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_75e9d4eb00e36a41) } -var fileDescriptor_authn_1d9e4c9a3e1162b3 = []byte{ +var fileDescriptor_authn_75e9d4eb00e36a41 = []byte{ // 1173 bytes of a gzipped FileDescriptorProto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0x17, 0x83, 0xc5, 0x9d, - 0xb6, 0xe5, 0x39, 0xa4, 0x17, 0x99, 0x06, 0xa5, 0xf5, 0x69, 0x83, 0xf5, 0xf5, 0xe8, 0x33, 0x7d, - 0xf4, 0x68, 0x1d, 0xe6, 0xed, 0x38, 0x0c, 0x89, 0x97, 0xe6, 0x5d, 0xc9, 0x0a, 0xfb, 0xb0, 0x1a, - 0x7f, 0x06, 0x57, 0xb6, 0x89, 0x43, 0xbd, 0x83, 0xad, 0x38, 0x6a, 0x27, 0x84, 0x18, 0x66, 0x83, - 0xd0, 0x3f, 0xa5, 0x2d, 0x12, 0xee, 0xf7, 0x32, 0x1d, 0xd0, 0xa1, 0x35, 0x28, 0x84, 0xa4, 0x45, - 0x43, 0x62, 0x47, 0x87, 0xe6, 0xae, 0xa2, 0xef, 0x57, 0xe1, 0xb7, 0x01, 0xf5, 0x43, 0xab, 0x71, - 0xe6, 0xc5, 0x28, 0x9c, 0xb4, 0x18, 0x25, 0xe3, 0x4d, 0x40, 0xca, 0x39, 0x8a, 0x43, 0xef, 0x5f, - 0x64, 0x83, 0xdf, 0x81, 0xd2, 0x40, 0x64, 0x8f, 0x2c, 0xc9, 0x28, 0x21, 0x4b, 0x64, 0xfc, 0x73, - 0x06, 0xe6, 0x76, 0x7c, 0xef, 0x88, 0x3a, 0x71, 0x28, 0xbe, 0x65, 0xb4, 0x04, 0x39, 0xca, 0x58, - 0x9c, 0x26, 0xa6, 0x24, 0xb4, 0x09, 0x95, 0x50, 0x21, 0x36, 0xa2, 0x4e, 0x40, 0x58, 0x83, 0xc5, - 0x41, 0xe0, 0x87, 0x11, 0xe1, 0xf3, 0x96, 0x5d, 0x9f, 0x31, 0x97, 0x12, 0xfb, 0x13, 0x6e, 0xae, - 0x27, 0x56, 0x74, 0x17, 0x96, 0x59, 0xdc, 0x7c, 0x4a, 0xec, 0xe8, 0x5c, 0x60, 0x56, 0x04, 0x2e, - 0x2a, 0xf3, 0x50, 0xdc, 0x01, 0xdc, 0x4c, 0xbe, 0xef, 0x06, 0xa3, 0x8e, 0x47, 0x3d, 0xa7, 0x61, - 0xb9, 0x4e, 0xe3, 0xd4, 0x72, 0xe3, 0x01, 0x94, 0x49, 0x81, 0xb2, 0xa6, 0x56, 0x40, 0x5d, 0xba, - 0x6e, 0xb9, 0xce, 0xc7, 0xc2, 0xb1, 0x07, 0x78, 0x0b, 0x16, 0x6c, 0xd7, 0xa2, 0x27, 0xfd, 0xb1, - 0x53, 0x22, 0x76, 0x5e, 0xea, 0x7b, 0xae, 0x57, 0x21, 0xff, 0xf4, 0xf9, 0x31, 0x6b, 0xc4, 0x21, - 0xad, 0xe4, 0x44, 0x1f, 0xa6, 0xb9, 0x7c, 0x18, 0x52, 0x7c, 0x00, 0xa5, 0x8f, 0x88, 0xe5, 0x46, - 0xed, 0x9d, 0x36, 0xb1, 0x8f, 0xd3, 0x2e, 0x23, 0x98, 0x6c, 0x47, 0x51, 0x20, 0xbf, 0x66, 0x53, - 0xbc, 0x51, 0x11, 0x32, 0xad, 0xa6, 0x98, 0x8a, 0xbc, 0x99, 0x69, 0x35, 0xf9, 0x9c, 0xf2, 0xce, - 0x33, 0x31, 0x87, 0x79, 0x53, 0x0a, 0x98, 0x42, 0x76, 0x8f, 0x74, 0xd0, 0x02, 0x64, 0x63, 0x96, - 0xfc, 0xb0, 0xfc, 0xc9, 0x35, 0x96, 0xeb, 0xa8, 0xee, 0xf2, 0x27, 0xd7, 0x1c, 0x47, 0x1d, 0x35, - 0xc6, 0xfc, 0x29, 0x34, 0x94, 0xb7, 0x40, 0x6a, 0x68, 0x0b, 0xcd, 0x82, 0x46, 0x2a, 0x53, 0x42, - 0xd6, 0x08, 0x97, 0x3c, 0x55, 0x81, 0xe6, 0xe1, 0x3b, 0x30, 0xfb, 0xe0, 0x93, 0xbd, 0x7a, 0x9a, - 0xf4, 0x75, 0x98, 0x3c, 0x26, 0x1d, 0x56, 0xd1, 0xd6, 0xb2, 0xeb, 0x85, 0x8d, 0x19, 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 0x81, 0x14, 0xce, + 0xf9, 0x65, 0x54, 0xbd, 0x3a, 0xc2, 0xa2, 0x28, 0x6e, 0x08, 0x0a, 0x1d, 0xad, 0x8c, 0xa4, 0x30, + 0x42, 0x09, 0xfd, 0x05, 0x94, 0xeb, 0x24, 0x3c, 0xa5, 0x36, 0x19, 0x5a, 0x3e, 0x63, 0x1a, 0x5b, + 0x8d, 0x9b, 0x01, 0xe7, 0xbe, 0x46, 0xb3, 0x07, 0x40, 0xb6, 0x60, 0x92, 0x0f, 0xb9, 0xb1, 0x60, + 0xea, 0xa1, 0xf7, 0x0f, 0x42, 0x3c, 0x27, 0xb0, 0xa6, 0xd1, 0x94, 0xc1, 0xc7, 0x3c, 0x7a, 0x0c, + 0x85, 0xbe, 0x19, 0x3f, 0x16, 0x49, 0xdd, 0xc3, 0x88, 0x75, 0x80, 0xe7, 0x05, 0xe0, 0x0c, 0x9a, + 0x36, 0xda, 0xc2, 0xba, 0xbd, 0xf1, 0xe2, 0x4c, 0x9f, 0xf8, 0xfd, 0x4c, 0x9f, 0x78, 0x7d, 0xa6, + 0x6b, 0xdf, 0x75, 0x75, 0xed, 0xa7, 0xae, 0xae, 0xfd, 0xd2, 0xd5, 0xb5, 0x17, 0x5d, 0x5d, 0xfb, + 0xa3, 0xab, 0x6b, 0x7f, 0x77, 0xf5, 0x89, 0xd7, 0x5d, 0x5d, 0xfb, 0xe1, 0x4f, 0x7d, 0xe2, 0x73, + 0xf1, 0xeb, 0xde, 0xcc, 0x09, 0xbe, 0x77, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x76, 0x02, 0x9d, + 0x2c, 0xd6, 0x0b, 0x00, 0x00, } diff --git a/grpc/authn.proto b/grpc/authn.proto index a971e4e2a5..c2b9b86807 100644 --- a/grpc/authn.proto +++ b/grpc/authn.proto @@ -72,7 +72,7 @@ message HealthCheckResponse { message Key { string use = 1; - repeated string alg = 2; + string alg = 2; string kty = 3; string kid = 4; string e = 5; From dba78afa41ff9ff78ba52a867cfe134777b31ace Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 26 Jan 2019 16:43:56 +0300 Subject: [PATCH 6/7] Fix having extra commas in the output of Error method of FieldErrors. Fixes #89 --- services/validations.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/validations.go b/services/validations.go index be409e5c0a..0c2a13c906 100644 --- a/services/validations.go +++ b/services/validations.go @@ -31,8 +31,8 @@ type FieldErrors []fieldError func (es FieldErrors) Error() string { var buf = make([]string, len(es)) - for _, e := range es { - buf = append(buf, e.String()) + for i, e := range es { + buf[i] = e.String() } return strings.Join(buf, ", ") } From 92c1263f069b9121906875e8b6d06298261238b3 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 9 Feb 2019 17:39:16 +0300 Subject: [PATCH 7/7] As of this commit, truly working package implementation of gRPC API in addition the already existing API. The gRPC API is not wired yet to the rest of the application. The work still needs further improvement, e.g. securing the gPRC API, better logging, among others. Configuration knobs are also yet to be hooked. --- go.mod | 8 +- go.sum | 12 + grpc/authn-private.pb.go | 4316 +++++++++++++++++++++++++----- grpc/authn-private.pb.gw.go | 505 +++- grpc/authn-private.proto | 125 +- grpc/authn.pb.go | 3848 ++++++++++++++------------ grpc/authn.pb.gw.go | 454 ++-- grpc/authn.pb_test.go | 48 - grpc/authn.proto | 202 +- grpc/internal/errors/errors.go | 102 + grpc/internal/gateway/gateway.go | 89 + grpc/internal/gateway/router.go | 29 + grpc/private/gateway.go | 80 + grpc/private/private_server.go | 118 + grpc/private/routing.go | 108 + grpc/private/secured.go | 131 + grpc/private/stats.go | 52 + grpc/private/unsecured.go | 60 + grpc/public/gateway.go | 62 + grpc/public/password_reset.go | 32 + grpc/public/passwordless.go | 72 + grpc/public/public_server.go | 312 +++ grpc/public/routing.go | 120 + grpc/public/signup.go | 76 + grpc/server.go | 149 -- grpc/server/server.go | 68 + 26 files changed, 8097 insertions(+), 3081 deletions(-) delete mode 100644 grpc/authn.pb_test.go create mode 100644 grpc/internal/errors/errors.go create mode 100644 grpc/internal/gateway/gateway.go create mode 100644 grpc/internal/gateway/router.go create mode 100644 grpc/private/gateway.go create mode 100644 grpc/private/private_server.go create mode 100644 grpc/private/routing.go create mode 100644 grpc/private/secured.go create mode 100644 grpc/private/stats.go create mode 100644 grpc/private/unsecured.go create mode 100644 grpc/public/gateway.go create mode 100644 grpc/public/password_reset.go create mode 100644 grpc/public/passwordless.go create mode 100644 grpc/public/public_server.go create mode 100644 grpc/public/routing.go create mode 100644 grpc/public/signup.go delete mode 100644 grpc/server.go create mode 100644 grpc/server/server.go diff --git a/go.mod b/go.mod index 3e8d88de70..afe844086b 100644 --- a/go.mod +++ b/go.mod @@ -11,13 +11,16 @@ require ( github.com/go-redis/redis v6.10.2+incompatible github.com/go-sql-driver/mysql v1.3.0 github.com/gogo/googleapis v1.1.0 - github.com/gogo/protobuf v1.1.1 + github.com/gogo/protobuf v1.2.0 github.com/golang/protobuf v1.2.0 + github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57 // indirect github.com/gorilla/context v1.1.1 // indirect github.com/gorilla/handlers v1.3.0 github.com/gorilla/mux v1.6.1 + github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 github.com/grpc-ecosystem/grpc-gateway v1.5.1 github.com/hpcloud/tail v1.0.0 // indirect + github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 // indirect github.com/jmoiron/sqlx v0.0.0-20170430194603-d9bd385d68c0 github.com/joho/godotenv v1.2.0 github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2 @@ -34,9 +37,12 @@ require ( github.com/prometheus/procfs v0.0.0-20171017214025-a6e9df898b13 // indirect github.com/sirupsen/logrus v1.0.5 github.com/stretchr/testify v1.2.1 + golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045 // indirect golang.org/x/crypto v0.0.0-20170619204222-adbae1b6b6fb golang.org/x/net v0.0.0-20180826012351-8a410e7b638d golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be + golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 + google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 google.golang.org/grpc v1.16.0 gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect gopkg.in/fsnotify.v1 v1.4.7 // indirect diff --git a/go.sum b/go.sum index 18ea83cc55..a886f19df2 100644 --- a/go.sum +++ b/go.sum @@ -23,22 +23,30 @@ github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57 h1:eqyIo2HjKhKe/mJzTG8n4VqvLXIOEG+SLdDqX7xGtkY= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.3.0 h1:tsg9qP3mjt1h4Roxp+M1paRjrVBfPSOpBuVclh6YluI= github.com/gorilla/handlers v1.3.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.1 h1:KOwqsTYZdeuMacU7CxjMNYEKeBvLbxW+psodrbcEa3A= github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/grpc-gateway v1.5.1 h1:3scN4iuXkNOyP98jF55Lv8a9j1o/IwvnDIZ0LHJK1nk= github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jmoiron/sqlx v0.0.0-20170430194603-d9bd385d68c0 h1:oZ1oQfWp4h9VX9Fmorc9DrmbHBwiw+mXphFDTVNp1vI= github.com/jmoiron/sqlx v0.0.0-20170430194603-d9bd385d68c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc= @@ -72,6 +80,8 @@ github.com/sirupsen/logrus v1.0.5 h1:8c8b5uO0zS4X6RPl/sd1ENwSkIc0/H2PaHxE3udaE8I github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045 h1:Pn8fQdvx+z1avAi7fdM2kRYWQNxGlavNDSyzrQg2SsU= +golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= golang.org/x/crypto v0.0.0-20170619204222-adbae1b6b6fb h1:6QZjMZJzos5C5rW30xO+0C8f9gKkgeb1z/K4gyS8DFA= golang.org/x/crypto v0.0.0-20170619204222-adbae1b6b6fb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -81,6 +91,8 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522 h1:Ve1ORMCxvRmSXBwJK+t3Oy+V2vRW2OetUQBq4rJIkZE= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= diff --git a/grpc/authn-private.pb.go b/grpc/authn-private.pb.go index ea1089f8ae..623ef631f4 100644 --- a/grpc/authn-private.pb.go +++ b/grpc/authn-private.pb.go @@ -8,7 +8,6 @@ import fmt "fmt" import math "math" import _ "github.com/gogo/googleapis/google/api" import _ "github.com/gogo/protobuf/gogoproto" -import types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" @@ -33,7 +32,7 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type GetAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -41,7 +40,7 @@ type GetAccountRequest struct { func (m *GetAccountRequest) Reset() { *m = GetAccountRequest{} } func (*GetAccountRequest) ProtoMessage() {} func (*GetAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{0} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{0} } func (m *GetAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -70,18 +69,18 @@ func (m *GetAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_GetAccountRequest proto.InternalMessageInfo -func (m *GetAccountRequest) GetId() string { +func (m *GetAccountRequest) GetId() int64 { if m != nil { return m.Id } - return "" + return 0 } type GetAccountResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked,omitempty"` - Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"` + Locked bool `protobuf:"varint,3,opt,name=locked,proto3" json:"locked"` + Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -89,7 +88,7 @@ type GetAccountResponse struct { func (m *GetAccountResponse) Reset() { *m = GetAccountResponse{} } func (*GetAccountResponse) ProtoMessage() {} func (*GetAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{1} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{1} } func (m *GetAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -155,7 +154,7 @@ type GetAccountResponseEnvelope struct { func (m *GetAccountResponseEnvelope) Reset() { *m = GetAccountResponseEnvelope{} } func (*GetAccountResponseEnvelope) ProtoMessage() {} func (*GetAccountResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{2} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{2} } func (m *GetAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +191,7 @@ func (m *GetAccountResponseEnvelope) GetResult() *GetAccountResponse { } type UpdateAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` @@ -201,7 +200,7 @@ type UpdateAccountRequest struct { func (m *UpdateAccountRequest) Reset() { *m = UpdateAccountRequest{} } func (*UpdateAccountRequest) ProtoMessage() {} func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{3} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{3} } func (m *UpdateAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -230,11 +229,11 @@ func (m *UpdateAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_UpdateAccountRequest proto.InternalMessageInfo -func (m *UpdateAccountRequest) GetId() string { +func (m *UpdateAccountRequest) GetId() int64 { if m != nil { return m.Id } - return "" + return 0 } func (m *UpdateAccountRequest) GetUsername() string { @@ -244,8 +243,45 @@ func (m *UpdateAccountRequest) GetUsername() string { return "" } +type UpdateAccountResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateAccountResponse) Reset() { *m = UpdateAccountResponse{} } +func (*UpdateAccountResponse) ProtoMessage() {} +func (*UpdateAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{4} +} +func (m *UpdateAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UpdateAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAccountResponse.Merge(dst, src) +} +func (m *UpdateAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *UpdateAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAccountResponse proto.InternalMessageInfo + type LockAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -253,7 +289,7 @@ type LockAccountRequest struct { func (m *LockAccountRequest) Reset() { *m = LockAccountRequest{} } func (*LockAccountRequest) ProtoMessage() {} func (*LockAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{4} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{5} } func (m *LockAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -282,15 +318,52 @@ func (m *LockAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_LockAccountRequest proto.InternalMessageInfo -func (m *LockAccountRequest) GetId() string { +func (m *LockAccountRequest) GetId() int64 { if m != nil { return m.Id } - return "" + return 0 +} + +type LockAccountResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LockAccountResponse) Reset() { *m = LockAccountResponse{} } +func (*LockAccountResponse) ProtoMessage() {} +func (*LockAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{6} +} +func (m *LockAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LockAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LockAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *LockAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LockAccountResponse.Merge(dst, src) } +func (m *LockAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *LockAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LockAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LockAccountResponse proto.InternalMessageInfo type UnlockAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -298,7 +371,7 @@ type UnlockAccountRequest struct { func (m *UnlockAccountRequest) Reset() { *m = UnlockAccountRequest{} } func (*UnlockAccountRequest) ProtoMessage() {} func (*UnlockAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{5} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{7} } func (m *UnlockAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,15 +400,52 @@ func (m *UnlockAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_UnlockAccountRequest proto.InternalMessageInfo -func (m *UnlockAccountRequest) GetId() string { +func (m *UnlockAccountRequest) GetId() int64 { if m != nil { return m.Id } - return "" + return 0 +} + +type UnlockAccountResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnlockAccountResponse) Reset() { *m = UnlockAccountResponse{} } +func (*UnlockAccountResponse) ProtoMessage() {} +func (*UnlockAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{8} +} +func (m *UnlockAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnlockAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnlockAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnlockAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnlockAccountResponse.Merge(dst, src) +} +func (m *UnlockAccountResponse) XXX_Size() int { + return m.Size() } +func (m *UnlockAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UnlockAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UnlockAccountResponse proto.InternalMessageInfo type ArchiveAccountRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -343,7 +453,7 @@ type ArchiveAccountRequest struct { func (m *ArchiveAccountRequest) Reset() { *m = ArchiveAccountRequest{} } func (*ArchiveAccountRequest) ProtoMessage() {} func (*ArchiveAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{6} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{9} } func (m *ArchiveAccountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -372,12 +482,49 @@ func (m *ArchiveAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_ArchiveAccountRequest proto.InternalMessageInfo -func (m *ArchiveAccountRequest) GetId() string { +func (m *ArchiveAccountRequest) GetId() int64 { if m != nil { return m.Id } - return "" + return 0 +} + +type ArchiveAccountResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ArchiveAccountResponse) Reset() { *m = ArchiveAccountResponse{} } +func (*ArchiveAccountResponse) ProtoMessage() {} +func (*ArchiveAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{10} +} +func (m *ArchiveAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ArchiveAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ArchiveAccountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ArchiveAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArchiveAccountResponse.Merge(dst, src) } +func (m *ArchiveAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *ArchiveAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ArchiveAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ArchiveAccountResponse proto.InternalMessageInfo type ImportAccountRequst struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` @@ -390,7 +537,7 @@ type ImportAccountRequst struct { func (m *ImportAccountRequst) Reset() { *m = ImportAccountRequst{} } func (*ImportAccountRequst) ProtoMessage() {} func (*ImportAccountRequst) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{7} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{11} } func (m *ImportAccountRequst) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -449,7 +596,7 @@ type ImportAccountResponse struct { func (m *ImportAccountResponse) Reset() { *m = ImportAccountResponse{} } func (*ImportAccountResponse) ProtoMessage() {} func (*ImportAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{8} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{12} } func (m *ImportAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +641,7 @@ type ImportAccountResponseEnvelope struct { func (m *ImportAccountResponseEnvelope) Reset() { *m = ImportAccountResponseEnvelope{} } func (*ImportAccountResponseEnvelope) ProtoMessage() {} func (*ImportAccountResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{9} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{13} } func (m *ImportAccountResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -531,7 +678,7 @@ func (m *ImportAccountResponseEnvelope) GetResult() *ImportAccountResponse { } type ExpirePasswordRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -539,7 +686,7 @@ type ExpirePasswordRequest struct { func (m *ExpirePasswordRequest) Reset() { *m = ExpirePasswordRequest{} } func (*ExpirePasswordRequest) ProtoMessage() {} func (*ExpirePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{10} + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{14} } func (m *ExpirePasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -568,30 +715,29 @@ func (m *ExpirePasswordRequest) XXX_DiscardUnknown() { var xxx_messageInfo_ExpirePasswordRequest proto.InternalMessageInfo -func (m *ExpirePasswordRequest) GetId() string { +func (m *ExpirePasswordRequest) GetId() int64 { if m != nil { return m.Id } - return "" + return 0 } -type ServiceStatsResponse struct { - Actives *ServiceStatsResponseActiveStats `protobuf:"bytes,1,opt,name=actives" json:"actives,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type ExpirePasswordResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ServiceStatsResponse) Reset() { *m = ServiceStatsResponse{} } -func (*ServiceStatsResponse) ProtoMessage() {} -func (*ServiceStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{11} +func (m *ExpirePasswordResponse) Reset() { *m = ExpirePasswordResponse{} } +func (*ExpirePasswordResponse) ProtoMessage() {} +func (*ExpirePasswordResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{15} } -func (m *ServiceStatsResponse) XXX_Unmarshal(b []byte) error { +func (m *ExpirePasswordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ServiceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ExpirePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ServiceStatsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_ExpirePasswordResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -601,44 +747,77 @@ func (m *ServiceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (dst *ServiceStatsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceStatsResponse.Merge(dst, src) +func (dst *ExpirePasswordResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpirePasswordResponse.Merge(dst, src) } -func (m *ServiceStatsResponse) XXX_Size() int { +func (m *ExpirePasswordResponse) XXX_Size() int { return m.Size() } -func (m *ServiceStatsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceStatsResponse.DiscardUnknown(m) +func (m *ExpirePasswordResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ExpirePasswordResponse.DiscardUnknown(m) } -var xxx_messageInfo_ServiceStatsResponse proto.InternalMessageInfo +var xxx_messageInfo_ExpirePasswordResponse proto.InternalMessageInfo -func (m *ServiceStatsResponse) GetActives() *ServiceStatsResponseActiveStats { - if m != nil { - return m.Actives +type JWKSRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JWKSRequest) Reset() { *m = JWKSRequest{} } +func (*JWKSRequest) ProtoMessage() {} +func (*JWKSRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{16} +} +func (m *JWKSRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *JWKSRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_JWKSRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return nil +} +func (dst *JWKSRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_JWKSRequest.Merge(dst, src) +} +func (m *JWKSRequest) XXX_Size() int { + return m.Size() +} +func (m *JWKSRequest) XXX_DiscardUnknown() { + xxx_messageInfo_JWKSRequest.DiscardUnknown(m) } -type ServiceStatsResponseActiveStats struct { - Daily map[string]int64 `protobuf:"bytes,1,rep,name=daily" json:"daily,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Weekly map[string]int64 `protobuf:"bytes,2,rep,name=weekly" json:"weekly,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Monthly map[string]int64 `protobuf:"bytes,3,rep,name=monthly" json:"monthly,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +var xxx_messageInfo_JWKSRequest proto.InternalMessageInfo + +type Key struct { + Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` + Alg string `protobuf:"bytes,2,opt,name=alg,proto3" json:"alg,omitempty"` + Kty string `protobuf:"bytes,3,opt,name=kty,proto3" json:"kty,omitempty"` + Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` + E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` + N string `protobuf:"bytes,6,opt,name=n,proto3" json:"n,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ServiceStatsResponseActiveStats) Reset() { *m = ServiceStatsResponseActiveStats{} } -func (*ServiceStatsResponseActiveStats) ProtoMessage() {} -func (*ServiceStatsResponseActiveStats) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_private_d4727a028c8ad90a, []int{11, 0} +func (m *Key) Reset() { *m = Key{} } +func (*Key) ProtoMessage() {} +func (*Key) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{17} } -func (m *ServiceStatsResponseActiveStats) XXX_Unmarshal(b []byte) error { +func (m *Key) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ServiceStatsResponseActiveStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ServiceStatsResponseActiveStats.Marshal(b, m, deterministic) + return xxx_messageInfo_Key.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -648,122 +827,407 @@ func (m *ServiceStatsResponseActiveStats) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (dst *ServiceStatsResponseActiveStats) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceStatsResponseActiveStats.Merge(dst, src) +func (dst *Key) XXX_Merge(src proto.Message) { + xxx_messageInfo_Key.Merge(dst, src) } -func (m *ServiceStatsResponseActiveStats) XXX_Size() int { +func (m *Key) XXX_Size() int { return m.Size() } -func (m *ServiceStatsResponseActiveStats) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceStatsResponseActiveStats.DiscardUnknown(m) +func (m *Key) XXX_DiscardUnknown() { + xxx_messageInfo_Key.DiscardUnknown(m) } -var xxx_messageInfo_ServiceStatsResponseActiveStats proto.InternalMessageInfo +var xxx_messageInfo_Key proto.InternalMessageInfo -func (m *ServiceStatsResponseActiveStats) GetDaily() map[string]int64 { +func (m *Key) GetUse() string { if m != nil { - return m.Daily + return m.Use } - return nil + return "" } -func (m *ServiceStatsResponseActiveStats) GetWeekly() map[string]int64 { +func (m *Key) GetAlg() string { if m != nil { - return m.Weekly + return m.Alg } - return nil + return "" } -func (m *ServiceStatsResponseActiveStats) GetMonthly() map[string]int64 { +func (m *Key) GetKty() string { if m != nil { - return m.Monthly + return m.Kty } - return nil + return "" } -func init() { - proto.RegisterType((*GetAccountRequest)(nil), "grpc.GetAccountRequest") - proto.RegisterType((*GetAccountResponse)(nil), "grpc.GetAccountResponse") - proto.RegisterType((*GetAccountResponseEnvelope)(nil), "grpc.GetAccountResponseEnvelope") - proto.RegisterType((*UpdateAccountRequest)(nil), "grpc.UpdateAccountRequest") - proto.RegisterType((*LockAccountRequest)(nil), "grpc.LockAccountRequest") - proto.RegisterType((*UnlockAccountRequest)(nil), "grpc.UnlockAccountRequest") - proto.RegisterType((*ArchiveAccountRequest)(nil), "grpc.ArchiveAccountRequest") - proto.RegisterType((*ImportAccountRequst)(nil), "grpc.ImportAccountRequst") - proto.RegisterType((*ImportAccountResponse)(nil), "grpc.ImportAccountResponse") - proto.RegisterType((*ImportAccountResponseEnvelope)(nil), "grpc.ImportAccountResponseEnvelope") - proto.RegisterType((*ExpirePasswordRequest)(nil), "grpc.ExpirePasswordRequest") - proto.RegisterType((*ServiceStatsResponse)(nil), "grpc.ServiceStatsResponse") - proto.RegisterType((*ServiceStatsResponseActiveStats)(nil), "grpc.ServiceStatsResponse.active_stats") - proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.DailyEntry") - proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.MonthlyEntry") - proto.RegisterMapType((map[string]int64)(nil), "grpc.ServiceStatsResponse.active_stats.WeeklyEntry") -} -func (this *GetAccountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *Key) GetKid() string { + if m != nil { + return m.Kid } + return "" +} - that1, ok := that.(*GetAccountRequest) - if !ok { - that2, ok := that.(GetAccountRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Id != that1.Id { - return false +func (m *Key) GetE() string { + if m != nil { + return m.E } - return true + return "" } -func (this *GetAccountResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *Key) GetN() string { + if m != nil { + return m.N } + return "" +} - that1, ok := that.(*GetAccountResponse) - if !ok { - that2, ok := that.(GetAccountResponse) - if ok { - that1 = &that2 - } else { - return false +type JWKSResponse struct { + Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } +func (*JWKSResponse) ProtoMessage() {} +func (*JWKSResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{18} +} +func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *JWKSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_JWKSResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Id != that1.Id { - return false +} +func (dst *JWKSResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JWKSResponse.Merge(dst, src) +} +func (m *JWKSResponse) XXX_Size() int { + return m.Size() +} +func (m *JWKSResponse) XXX_DiscardUnknown() { + xxx_messageInfo_JWKSResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_JWKSResponse proto.InternalMessageInfo + +func (m *JWKSResponse) GetKeys() []*Key { + if m != nil { + return m.Keys } - if this.Username != that1.Username { - return false + return nil +} + +type ServiceStatsRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceStatsRequest) Reset() { *m = ServiceStatsRequest{} } +func (*ServiceStatsRequest) ProtoMessage() {} +func (*ServiceStatsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{19} +} +func (m *ServiceStatsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceStatsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil } - if this.Locked != that1.Locked { - return false +} +func (dst *ServiceStatsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceStatsRequest.Merge(dst, src) +} +func (m *ServiceStatsRequest) XXX_Size() int { + return m.Size() +} +func (m *ServiceStatsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceStatsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceStatsRequest proto.InternalMessageInfo + +type ServiceStatsResponse struct { + Actives *ServiceStatsResponseActiveStats `protobuf:"bytes,1,opt,name=actives" json:"actives,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceStatsResponse) Reset() { *m = ServiceStatsResponse{} } +func (*ServiceStatsResponse) ProtoMessage() {} +func (*ServiceStatsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{20} +} +func (m *ServiceStatsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceStatsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil } - if this.Deleted != that1.Deleted { - return false +} +func (dst *ServiceStatsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceStatsResponse.Merge(dst, src) +} +func (m *ServiceStatsResponse) XXX_Size() int { + return m.Size() +} +func (m *ServiceStatsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceStatsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceStatsResponse proto.InternalMessageInfo + +func (m *ServiceStatsResponse) GetActives() *ServiceStatsResponseActiveStats { + if m != nil { + return m.Actives } - return true + return nil } -func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { + +type ServiceStatsResponseActiveStats struct { + Daily map[string]int64 `protobuf:"bytes,1,rep,name=daily" json:"daily,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Weekly map[string]int64 `protobuf:"bytes,2,rep,name=weekly" json:"weekly,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Monthly map[string]int64 `protobuf:"bytes,3,rep,name=monthly" json:"monthly,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceStatsResponseActiveStats) Reset() { *m = ServiceStatsResponseActiveStats{} } +func (*ServiceStatsResponseActiveStats) ProtoMessage() {} +func (*ServiceStatsResponseActiveStats) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{20, 0} +} +func (m *ServiceStatsResponseActiveStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceStatsResponseActiveStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceStatsResponseActiveStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ServiceStatsResponseActiveStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceStatsResponseActiveStats.Merge(dst, src) +} +func (m *ServiceStatsResponseActiveStats) XXX_Size() int { + return m.Size() +} +func (m *ServiceStatsResponseActiveStats) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceStatsResponseActiveStats.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceStatsResponseActiveStats proto.InternalMessageInfo + +func (m *ServiceStatsResponseActiveStats) GetDaily() map[string]int64 { + if m != nil { + return m.Daily + } + return nil +} + +func (m *ServiceStatsResponseActiveStats) GetWeekly() map[string]int64 { + if m != nil { + return m.Weekly + } + return nil +} + +func (m *ServiceStatsResponseActiveStats) GetMonthly() map[string]int64 { + if m != nil { + return m.Monthly + } + return nil +} + +type ServiceConfigurationRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceConfigurationRequest) Reset() { *m = ServiceConfigurationRequest{} } +func (*ServiceConfigurationRequest) ProtoMessage() {} +func (*ServiceConfigurationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{21} +} +func (m *ServiceConfigurationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceConfigurationRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ServiceConfigurationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceConfigurationRequest.Merge(dst, src) +} +func (m *ServiceConfigurationRequest) XXX_Size() int { + return m.Size() +} +func (m *ServiceConfigurationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceConfigurationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceConfigurationRequest proto.InternalMessageInfo + +type Configuration struct { + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + ResponseTypesSupported []string `protobuf:"bytes,2,rep,name=response_types_supported,json=responseTypesSupported" json:"response_types_supported,omitempty"` + SubjectTypesSupported []string `protobuf:"bytes,3,rep,name=subject_types_supported,json=subjectTypesSupported" json:"subject_types_supported,omitempty"` + IdTokenSigningAlgValuesSupported []string `protobuf:"bytes,4,rep,name=id_token_signing_alg_values_supported,json=idTokenSigningAlgValuesSupported" json:"id_token_signing_alg_values_supported,omitempty"` + ClaimsSupported []string `protobuf:"bytes,5,rep,name=claims_supported,json=claimsSupported" json:"claims_supported,omitempty"` + JwksUri string `protobuf:"bytes,6,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Configuration) Reset() { *m = Configuration{} } +func (*Configuration) ProtoMessage() {} +func (*Configuration) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_private_c60a8bdddc03adb9, []int{22} +} +func (m *Configuration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Configuration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Configuration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Configuration.Merge(dst, src) +} +func (m *Configuration) XXX_Size() int { + return m.Size() +} +func (m *Configuration) XXX_DiscardUnknown() { + xxx_messageInfo_Configuration.DiscardUnknown(m) +} + +var xxx_messageInfo_Configuration proto.InternalMessageInfo + +func (m *Configuration) GetIssuer() string { + if m != nil { + return m.Issuer + } + return "" +} + +func (m *Configuration) GetResponseTypesSupported() []string { + if m != nil { + return m.ResponseTypesSupported + } + return nil +} + +func (m *Configuration) GetSubjectTypesSupported() []string { + if m != nil { + return m.SubjectTypesSupported + } + return nil +} + +func (m *Configuration) GetIdTokenSigningAlgValuesSupported() []string { + if m != nil { + return m.IdTokenSigningAlgValuesSupported + } + return nil +} + +func (m *Configuration) GetClaimsSupported() []string { + if m != nil { + return m.ClaimsSupported + } + return nil +} + +func (m *Configuration) GetJwksUri() string { + if m != nil { + return m.JwksUri + } + return "" +} + +func init() { + proto.RegisterType((*GetAccountRequest)(nil), "keratin.authn.GetAccountRequest") + proto.RegisterType((*GetAccountResponse)(nil), "keratin.authn.GetAccountResponse") + proto.RegisterType((*GetAccountResponseEnvelope)(nil), "keratin.authn.GetAccountResponseEnvelope") + proto.RegisterType((*UpdateAccountRequest)(nil), "keratin.authn.UpdateAccountRequest") + proto.RegisterType((*UpdateAccountResponse)(nil), "keratin.authn.UpdateAccountResponse") + proto.RegisterType((*LockAccountRequest)(nil), "keratin.authn.LockAccountRequest") + proto.RegisterType((*LockAccountResponse)(nil), "keratin.authn.LockAccountResponse") + proto.RegisterType((*UnlockAccountRequest)(nil), "keratin.authn.UnlockAccountRequest") + proto.RegisterType((*UnlockAccountResponse)(nil), "keratin.authn.UnlockAccountResponse") + proto.RegisterType((*ArchiveAccountRequest)(nil), "keratin.authn.ArchiveAccountRequest") + proto.RegisterType((*ArchiveAccountResponse)(nil), "keratin.authn.ArchiveAccountResponse") + proto.RegisterType((*ImportAccountRequst)(nil), "keratin.authn.ImportAccountRequst") + proto.RegisterType((*ImportAccountResponse)(nil), "keratin.authn.ImportAccountResponse") + proto.RegisterType((*ImportAccountResponseEnvelope)(nil), "keratin.authn.ImportAccountResponseEnvelope") + proto.RegisterType((*ExpirePasswordRequest)(nil), "keratin.authn.ExpirePasswordRequest") + proto.RegisterType((*ExpirePasswordResponse)(nil), "keratin.authn.ExpirePasswordResponse") + proto.RegisterType((*JWKSRequest)(nil), "keratin.authn.JWKSRequest") + proto.RegisterType((*Key)(nil), "keratin.authn.Key") + proto.RegisterType((*JWKSResponse)(nil), "keratin.authn.JWKSResponse") + proto.RegisterType((*ServiceStatsRequest)(nil), "keratin.authn.ServiceStatsRequest") + proto.RegisterType((*ServiceStatsResponse)(nil), "keratin.authn.ServiceStatsResponse") + proto.RegisterType((*ServiceStatsResponseActiveStats)(nil), "keratin.authn.ServiceStatsResponse.active_stats") + proto.RegisterMapType((map[string]int64)(nil), "keratin.authn.ServiceStatsResponse.active_stats.DailyEntry") + proto.RegisterMapType((map[string]int64)(nil), "keratin.authn.ServiceStatsResponse.active_stats.MonthlyEntry") + proto.RegisterMapType((map[string]int64)(nil), "keratin.authn.ServiceStatsResponse.active_stats.WeeklyEntry") + proto.RegisterType((*ServiceConfigurationRequest)(nil), "keratin.authn.ServiceConfigurationRequest") + proto.RegisterType((*Configuration)(nil), "keratin.authn.Configuration") +} +func (this *GetAccountRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*GetAccountResponseEnvelope) + that1, ok := that.(*GetAccountRequest) if !ok { - that2, ok := that.(GetAccountResponseEnvelope) + that2, ok := that.(GetAccountRequest) if ok { that1 = &that2 } else { @@ -775,19 +1239,19 @@ func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.Result.Equal(that1.Result) { + if this.Id != that1.Id { return false } return true } -func (this *UpdateAccountRequest) Equal(that interface{}) bool { +func (this *GetAccountResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*UpdateAccountRequest) + that1, ok := that.(*GetAccountResponse) if !ok { - that2, ok := that.(UpdateAccountRequest) + that2, ok := that.(GetAccountResponse) if ok { that1 = &that2 } else { @@ -805,16 +1269,22 @@ func (this *UpdateAccountRequest) Equal(that interface{}) bool { if this.Username != that1.Username { return false } + if this.Locked != that1.Locked { + return false + } + if this.Deleted != that1.Deleted { + return false + } return true } -func (this *LockAccountRequest) Equal(that interface{}) bool { +func (this *GetAccountResponseEnvelope) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*LockAccountRequest) + that1, ok := that.(*GetAccountResponseEnvelope) if !ok { - that2, ok := that.(LockAccountRequest) + that2, ok := that.(GetAccountResponseEnvelope) if ok { that1 = &that2 } else { @@ -826,19 +1296,19 @@ func (this *LockAccountRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Id != that1.Id { + if !this.Result.Equal(that1.Result) { return false } return true } -func (this *UnlockAccountRequest) Equal(that interface{}) bool { +func (this *UpdateAccountRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*UnlockAccountRequest) + that1, ok := that.(*UpdateAccountRequest) if !ok { - that2, ok := that.(UnlockAccountRequest) + that2, ok := that.(UpdateAccountRequest) if ok { that1 = &that2 } else { @@ -853,16 +1323,19 @@ func (this *UnlockAccountRequest) Equal(that interface{}) bool { if this.Id != that1.Id { return false } + if this.Username != that1.Username { + return false + } return true } -func (this *ArchiveAccountRequest) Equal(that interface{}) bool { +func (this *UpdateAccountResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*ArchiveAccountRequest) + that1, ok := that.(*UpdateAccountResponse) if !ok { - that2, ok := that.(ArchiveAccountRequest) + that2, ok := that.(UpdateAccountResponse) if ok { that1 = &that2 } else { @@ -874,19 +1347,151 @@ func (this *ArchiveAccountRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Id != that1.Id { - return false - } return true } -func (this *ImportAccountRequst) Equal(that interface{}) bool { +func (this *LockAccountRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*ImportAccountRequst) + that1, ok := that.(*LockAccountRequest) if !ok { - that2, ok := that.(ImportAccountRequst) + that2, ok := that.(LockAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *LockAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LockAccountResponse) + if !ok { + that2, ok := that.(LockAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *UnlockAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnlockAccountRequest) + if !ok { + that2, ok := that.(UnlockAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *UnlockAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnlockAccountResponse) + if !ok { + that2, ok := that.(UnlockAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *ArchiveAccountRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ArchiveAccountRequest) + if !ok { + that2, ok := that.(ArchiveAccountRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *ArchiveAccountResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ArchiveAccountResponse) + if !ok { + that2, ok := that.(ArchiveAccountResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *ImportAccountRequst) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ImportAccountRequst) + if !ok { + that2, ok := that.(ImportAccountRequst) if ok { that1 = &that2 } else { @@ -981,6 +1586,137 @@ func (this *ExpirePasswordRequest) Equal(that interface{}) bool { } return true } +func (this *ExpirePasswordResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ExpirePasswordResponse) + if !ok { + that2, ok := that.(ExpirePasswordResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *JWKSRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*JWKSRequest) + if !ok { + that2, ok := that.(JWKSRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *Key) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Key) + if !ok { + that2, ok := that.(Key) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Use != that1.Use { + return false + } + if this.Alg != that1.Alg { + return false + } + if this.Kty != that1.Kty { + return false + } + if this.Kid != that1.Kid { + return false + } + if this.E != that1.E { + return false + } + if this.N != that1.N { + return false + } + return true +} +func (this *JWKSResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*JWKSResponse) + if !ok { + that2, ok := that.(JWKSResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Keys) != len(that1.Keys) { + return false + } + for i := range this.Keys { + if !this.Keys[i].Equal(that1.Keys[i]) { + return false + } + } + return true +} +func (this *ServiceStatsRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ServiceStatsRequest) + if !ok { + that2, ok := that.(ServiceStatsRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} func (this *ServiceStatsResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1050,21 +1786,101 @@ func (this *ServiceStatsResponseActiveStats) Equal(that interface{}) bool { } return true } -func (this *GetAccountRequest) GoString() string { - if this == nil { - return "nil" +func (this *ServiceConfigurationRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 5) - s = append(s, "&grpc.GetAccountRequest{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetAccountResponse) GoString() string { - if this == nil { - return "nil" + + that1, ok := that.(*ServiceConfigurationRequest) + if !ok { + that2, ok := that.(ServiceConfigurationRequest) + if ok { + that1 = &that2 + } else { + return false + } } - s := make([]string, 0, 8) + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *Configuration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Configuration) + if !ok { + that2, ok := that.(Configuration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Issuer != that1.Issuer { + return false + } + if len(this.ResponseTypesSupported) != len(that1.ResponseTypesSupported) { + return false + } + for i := range this.ResponseTypesSupported { + if this.ResponseTypesSupported[i] != that1.ResponseTypesSupported[i] { + return false + } + } + if len(this.SubjectTypesSupported) != len(that1.SubjectTypesSupported) { + return false + } + for i := range this.SubjectTypesSupported { + if this.SubjectTypesSupported[i] != that1.SubjectTypesSupported[i] { + return false + } + } + if len(this.IdTokenSigningAlgValuesSupported) != len(that1.IdTokenSigningAlgValuesSupported) { + return false + } + for i := range this.IdTokenSigningAlgValuesSupported { + if this.IdTokenSigningAlgValuesSupported[i] != that1.IdTokenSigningAlgValuesSupported[i] { + return false + } + } + if len(this.ClaimsSupported) != len(that1.ClaimsSupported) { + return false + } + for i := range this.ClaimsSupported { + if this.ClaimsSupported[i] != that1.ClaimsSupported[i] { + return false + } + } + if this.JwksUri != that1.JwksUri { + return false + } + return true +} +func (this *GetAccountRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.GetAccountRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) s = append(s, "&grpc.GetAccountResponse{") s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") @@ -1096,6 +1912,15 @@ func (this *UpdateAccountRequest) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *UpdateAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.UpdateAccountResponse{") + s = append(s, "}") + return strings.Join(s, "") +} func (this *LockAccountRequest) GoString() string { if this == nil { return "nil" @@ -1106,6 +1931,15 @@ func (this *LockAccountRequest) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *LockAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.LockAccountResponse{") + s = append(s, "}") + return strings.Join(s, "") +} func (this *UnlockAccountRequest) GoString() string { if this == nil { return "nil" @@ -1116,6 +1950,15 @@ func (this *UnlockAccountRequest) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *UnlockAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.UnlockAccountResponse{") + s = append(s, "}") + return strings.Join(s, "") +} func (this *ArchiveAccountRequest) GoString() string { if this == nil { return "nil" @@ -1126,6 +1969,15 @@ func (this *ArchiveAccountRequest) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *ArchiveAccountResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.ArchiveAccountResponse{") + s = append(s, "}") + return strings.Join(s, "") +} func (this *ImportAccountRequst) GoString() string { if this == nil { return "nil" @@ -1170,6 +2022,60 @@ func (this *ExpirePasswordRequest) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *ExpirePasswordResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.ExpirePasswordResponse{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *JWKSRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.JWKSRequest{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Key) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&grpc.Key{") + s = append(s, "Use: "+fmt.Sprintf("%#v", this.Use)+",\n") + s = append(s, "Alg: "+fmt.Sprintf("%#v", this.Alg)+",\n") + s = append(s, "Kty: "+fmt.Sprintf("%#v", this.Kty)+",\n") + s = append(s, "Kid: "+fmt.Sprintf("%#v", this.Kid)+",\n") + s = append(s, "E: "+fmt.Sprintf("%#v", this.E)+",\n") + s = append(s, "N: "+fmt.Sprintf("%#v", this.N)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *JWKSResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&grpc.JWKSResponse{") + if this.Keys != nil { + s = append(s, "Keys: "+fmt.Sprintf("%#v", this.Keys)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceStatsRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.ServiceStatsRequest{") + s = append(s, "}") + return strings.Join(s, "") +} func (this *ServiceStatsResponse) GoString() string { if this == nil { return "nil" @@ -1230,6 +2136,30 @@ func (this *ServiceStatsResponseActiveStats) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *ServiceConfigurationRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.ServiceConfigurationRequest{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Configuration) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&grpc.Configuration{") + s = append(s, "Issuer: "+fmt.Sprintf("%#v", this.Issuer)+",\n") + s = append(s, "ResponseTypesSupported: "+fmt.Sprintf("%#v", this.ResponseTypesSupported)+",\n") + s = append(s, "SubjectTypesSupported: "+fmt.Sprintf("%#v", this.SubjectTypesSupported)+",\n") + s = append(s, "IdTokenSigningAlgValuesSupported: "+fmt.Sprintf("%#v", this.IdTokenSigningAlgValuesSupported)+",\n") + s = append(s, "ClaimsSupported: "+fmt.Sprintf("%#v", this.ClaimsSupported)+",\n") + s = append(s, "JwksUri: "+fmt.Sprintf("%#v", this.JwksUri)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func valueToGoStringAuthnPrivate(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -1247,322 +2177,449 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// AdminAuthNClient is the client API for AdminAuthN service. +// UnsecuredAdminAuthNClient is the client API for UnsecuredAdminAuthN service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AdminAuthNClient interface { - GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) - ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) - ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) - ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) +type UnsecuredAdminAuthNClient interface { + JWKS(ctx context.Context, in *JWKSRequest, opts ...grpc.CallOption) (*JWKSResponse, error) + ServiceConfiguration(ctx context.Context, in *ServiceConfigurationRequest, opts ...grpc.CallOption) (*Configuration, error) } -type adminAuthNClient struct { +type unsecuredAdminAuthNClient struct { cc *grpc.ClientConn } -func NewAdminAuthNClient(cc *grpc.ClientConn) AdminAuthNClient { - return &adminAuthNClient{cc} +func NewUnsecuredAdminAuthNClient(cc *grpc.ClientConn) UnsecuredAdminAuthNClient { + return &unsecuredAdminAuthNClient{cc} } -func (c *adminAuthNClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) { - out := new(GetAccountResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/GetAccount", in, out, opts...) +func (c *unsecuredAdminAuthNClient) JWKS(ctx context.Context, in *JWKSRequest, opts ...grpc.CallOption) (*JWKSResponse, error) { + out := new(JWKSResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.UnsecuredAdminAuthN/JWKS", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *adminAuthNClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/UpdateAccount", in, out, opts...) +func (c *unsecuredAdminAuthNClient) ServiceConfiguration(ctx context.Context, in *ServiceConfigurationRequest, opts ...grpc.CallOption) (*Configuration, error) { + out := new(Configuration) + err := c.cc.Invoke(ctx, "/keratin.authn.UnsecuredAdminAuthN/ServiceConfiguration", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *adminAuthNClient) LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/LockAccount", in, out, opts...) +// UnsecuredAdminAuthNServer is the server API for UnsecuredAdminAuthN service. +type UnsecuredAdminAuthNServer interface { + JWKS(context.Context, *JWKSRequest) (*JWKSResponse, error) + ServiceConfiguration(context.Context, *ServiceConfigurationRequest) (*Configuration, error) +} + +func RegisterUnsecuredAdminAuthNServer(s *grpc.Server, srv UnsecuredAdminAuthNServer) { + s.RegisterService(&_UnsecuredAdminAuthN_serviceDesc, srv) +} + +func _UnsecuredAdminAuthN_JWKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(JWKSRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UnsecuredAdminAuthNServer).JWKS(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keratin.authn.UnsecuredAdminAuthN/JWKS", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UnsecuredAdminAuthNServer).JWKS(ctx, req.(*JWKSRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UnsecuredAdminAuthN_ServiceConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServiceConfigurationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UnsecuredAdminAuthNServer).ServiceConfiguration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keratin.authn.UnsecuredAdminAuthN/ServiceConfiguration", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UnsecuredAdminAuthNServer).ServiceConfiguration(ctx, req.(*ServiceConfigurationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _UnsecuredAdminAuthN_serviceDesc = grpc.ServiceDesc{ + ServiceName: "keratin.authn.UnsecuredAdminAuthN", + HandlerType: (*UnsecuredAdminAuthNServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "JWKS", + Handler: _UnsecuredAdminAuthN_JWKS_Handler, + }, + { + MethodName: "ServiceConfiguration", + Handler: _UnsecuredAdminAuthN_ServiceConfiguration_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn-private.proto", +} + +// SecuredAdminAuthNClient is the client API for SecuredAdminAuthN service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SecuredAdminAuthNClient interface { + ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error) + LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*LockAccountResponse, error) + UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*UnlockAccountResponse, error) + ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*ArchiveAccountResponse, error) + ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*ExpirePasswordResponse, error) +} + +type securedAdminAuthNClient struct { + cc *grpc.ClientConn +} + +func NewSecuredAdminAuthNClient(cc *grpc.ClientConn) SecuredAdminAuthNClient { + return &securedAdminAuthNClient{cc} +} + +func (c *securedAdminAuthNClient) ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) { + out := new(ImportAccountResponseEnvelope) + err := c.cc.Invoke(ctx, "/keratin.authn.SecuredAdminAuthN/ImportAccount", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *adminAuthNClient) UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/UnlockAcount", in, out, opts...) +func (c *securedAdminAuthNClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponseEnvelope, error) { + out := new(GetAccountResponseEnvelope) + err := c.cc.Invoke(ctx, "/keratin.authn.SecuredAdminAuthN/GetAccount", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *adminAuthNClient) ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ArchiveAccount", in, out, opts...) +func (c *securedAdminAuthNClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error) { + out := new(UpdateAccountResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.SecuredAdminAuthN/UpdateAccount", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *adminAuthNClient) ImportAccount(ctx context.Context, in *ImportAccountRequst, opts ...grpc.CallOption) (*ImportAccountResponseEnvelope, error) { - out := new(ImportAccountResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ImportAccount", in, out, opts...) +func (c *securedAdminAuthNClient) LockAccount(ctx context.Context, in *LockAccountRequest, opts ...grpc.CallOption) (*LockAccountResponse, error) { + out := new(LockAccountResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.SecuredAdminAuthN/LockAccount", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *adminAuthNClient) ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ExpirePassword", in, out, opts...) +func (c *securedAdminAuthNClient) UnlockAcount(ctx context.Context, in *UnlockAccountRequest, opts ...grpc.CallOption) (*UnlockAccountResponse, error) { + out := new(UnlockAccountResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.SecuredAdminAuthN/UnlockAcount", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *adminAuthNClient) ServiceStats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ServiceStatsResponse, error) { - out := new(ServiceStatsResponse) - err := c.cc.Invoke(ctx, "/grpc.AdminAuthN/ServiceStats", in, out, opts...) +func (c *securedAdminAuthNClient) ArchiveAccount(ctx context.Context, in *ArchiveAccountRequest, opts ...grpc.CallOption) (*ArchiveAccountResponse, error) { + out := new(ArchiveAccountResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.SecuredAdminAuthN/ArchiveAccount", in, out, opts...) if err != nil { return nil, err } return out, nil } -// AdminAuthNServer is the server API for AdminAuthN service. -type AdminAuthNServer interface { - GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponseEnvelope, error) - UpdateAccount(context.Context, *UpdateAccountRequest) (*types.Empty, error) - LockAccount(context.Context, *LockAccountRequest) (*types.Empty, error) - UnlockAcount(context.Context, *UnlockAccountRequest) (*types.Empty, error) - ArchiveAccount(context.Context, *ArchiveAccountRequest) (*types.Empty, error) - ImportAccount(context.Context, *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) - ExpirePassword(context.Context, *ExpirePasswordRequest) (*types.Empty, error) - ServiceStats(context.Context, *types.Empty) (*ServiceStatsResponse, error) +func (c *securedAdminAuthNClient) ExpirePassword(ctx context.Context, in *ExpirePasswordRequest, opts ...grpc.CallOption) (*ExpirePasswordResponse, error) { + out := new(ExpirePasswordResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.SecuredAdminAuthN/ExpirePassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func RegisterAdminAuthNServer(s *grpc.Server, srv AdminAuthNServer) { - s.RegisterService(&_AdminAuthN_serviceDesc, srv) +// SecuredAdminAuthNServer is the server API for SecuredAdminAuthN service. +type SecuredAdminAuthNServer interface { + ImportAccount(context.Context, *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) + GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponseEnvelope, error) + UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) + LockAccount(context.Context, *LockAccountRequest) (*LockAccountResponse, error) + UnlockAcount(context.Context, *UnlockAccountRequest) (*UnlockAccountResponse, error) + ArchiveAccount(context.Context, *ArchiveAccountRequest) (*ArchiveAccountResponse, error) + ExpirePassword(context.Context, *ExpirePasswordRequest) (*ExpirePasswordResponse, error) } -func _AdminAuthN_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AdminAuthNServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.AdminAuthN/GetAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminAuthNServer).GetAccount(ctx, req.(*GetAccountRequest)) - } - return interceptor(ctx, in, info, handler) +func RegisterSecuredAdminAuthNServer(s *grpc.Server, srv SecuredAdminAuthNServer) { + s.RegisterService(&_SecuredAdminAuthN_serviceDesc, srv) } -func _AdminAuthN_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateAccountRequest) +func _SecuredAdminAuthN_ImportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportAccountRequst) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminAuthNServer).UpdateAccount(ctx, in) + return srv.(SecuredAdminAuthNServer).ImportAccount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.AdminAuthN/UpdateAccount", + FullMethod: "/keratin.authn.SecuredAdminAuthN/ImportAccount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminAuthNServer).UpdateAccount(ctx, req.(*UpdateAccountRequest)) + return srv.(SecuredAdminAuthNServer).ImportAccount(ctx, req.(*ImportAccountRequst)) } return interceptor(ctx, in, info, handler) } -func _AdminAuthN_LockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LockAccountRequest) +func _SecuredAdminAuthN_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminAuthNServer).LockAccount(ctx, in) + return srv.(SecuredAdminAuthNServer).GetAccount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.AdminAuthN/LockAccount", + FullMethod: "/keratin.authn.SecuredAdminAuthN/GetAccount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminAuthNServer).LockAccount(ctx, req.(*LockAccountRequest)) + return srv.(SecuredAdminAuthNServer).GetAccount(ctx, req.(*GetAccountRequest)) } return interceptor(ctx, in, info, handler) } -func _AdminAuthN_UnlockAcount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnlockAccountRequest) +func _SecuredAdminAuthN_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAccountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminAuthNServer).UnlockAcount(ctx, in) + return srv.(SecuredAdminAuthNServer).UpdateAccount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.AdminAuthN/UnlockAcount", + FullMethod: "/keratin.authn.SecuredAdminAuthN/UpdateAccount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminAuthNServer).UnlockAcount(ctx, req.(*UnlockAccountRequest)) + return srv.(SecuredAdminAuthNServer).UpdateAccount(ctx, req.(*UpdateAccountRequest)) } return interceptor(ctx, in, info, handler) } -func _AdminAuthN_ArchiveAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveAccountRequest) +func _SecuredAdminAuthN_LockAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LockAccountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminAuthNServer).ArchiveAccount(ctx, in) + return srv.(SecuredAdminAuthNServer).LockAccount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.AdminAuthN/ArchiveAccount", + FullMethod: "/keratin.authn.SecuredAdminAuthN/LockAccount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminAuthNServer).ArchiveAccount(ctx, req.(*ArchiveAccountRequest)) + return srv.(SecuredAdminAuthNServer).LockAccount(ctx, req.(*LockAccountRequest)) } return interceptor(ctx, in, info, handler) } -func _AdminAuthN_ImportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportAccountRequst) +func _SecuredAdminAuthN_UnlockAcount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnlockAccountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminAuthNServer).ImportAccount(ctx, in) + return srv.(SecuredAdminAuthNServer).UnlockAcount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.AdminAuthN/ImportAccount", + FullMethod: "/keratin.authn.SecuredAdminAuthN/UnlockAcount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminAuthNServer).ImportAccount(ctx, req.(*ImportAccountRequst)) + return srv.(SecuredAdminAuthNServer).UnlockAcount(ctx, req.(*UnlockAccountRequest)) } return interceptor(ctx, in, info, handler) } -func _AdminAuthN_ExpirePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExpirePasswordRequest) +func _SecuredAdminAuthN_ArchiveAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveAccountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminAuthNServer).ExpirePassword(ctx, in) + return srv.(SecuredAdminAuthNServer).ArchiveAccount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.AdminAuthN/ExpirePassword", + FullMethod: "/keratin.authn.SecuredAdminAuthN/ArchiveAccount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminAuthNServer).ExpirePassword(ctx, req.(*ExpirePasswordRequest)) + return srv.(SecuredAdminAuthNServer).ArchiveAccount(ctx, req.(*ArchiveAccountRequest)) } return interceptor(ctx, in, info, handler) } -func _AdminAuthN_ServiceStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) +func _SecuredAdminAuthN_ExpirePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExpirePasswordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminAuthNServer).ServiceStats(ctx, in) + return srv.(SecuredAdminAuthNServer).ExpirePassword(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.AdminAuthN/ServiceStats", + FullMethod: "/keratin.authn.SecuredAdminAuthN/ExpirePassword", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminAuthNServer).ServiceStats(ctx, req.(*types.Empty)) + return srv.(SecuredAdminAuthNServer).ExpirePassword(ctx, req.(*ExpirePasswordRequest)) } return interceptor(ctx, in, info, handler) } -var _AdminAuthN_serviceDesc = grpc.ServiceDesc{ - ServiceName: "grpc.AdminAuthN", - HandlerType: (*AdminAuthNServer)(nil), +var _SecuredAdminAuthN_serviceDesc = grpc.ServiceDesc{ + ServiceName: "keratin.authn.SecuredAdminAuthN", + HandlerType: (*SecuredAdminAuthNServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "ImportAccount", + Handler: _SecuredAdminAuthN_ImportAccount_Handler, + }, { MethodName: "GetAccount", - Handler: _AdminAuthN_GetAccount_Handler, + Handler: _SecuredAdminAuthN_GetAccount_Handler, }, { MethodName: "UpdateAccount", - Handler: _AdminAuthN_UpdateAccount_Handler, + Handler: _SecuredAdminAuthN_UpdateAccount_Handler, }, { MethodName: "LockAccount", - Handler: _AdminAuthN_LockAccount_Handler, + Handler: _SecuredAdminAuthN_LockAccount_Handler, }, { MethodName: "UnlockAcount", - Handler: _AdminAuthN_UnlockAcount_Handler, + Handler: _SecuredAdminAuthN_UnlockAcount_Handler, }, { MethodName: "ArchiveAccount", - Handler: _AdminAuthN_ArchiveAccount_Handler, - }, - { - MethodName: "ImportAccount", - Handler: _AdminAuthN_ImportAccount_Handler, + Handler: _SecuredAdminAuthN_ArchiveAccount_Handler, }, { MethodName: "ExpirePassword", - Handler: _AdminAuthN_ExpirePassword_Handler, - }, - { - MethodName: "ServiceStats", - Handler: _AdminAuthN_ServiceStats_Handler, + Handler: _SecuredAdminAuthN_ExpirePassword_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "authn-private.proto", } -func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) +// AuthNActivesClient is the client API for AuthNActives service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AuthNActivesClient interface { + ServiceStats(ctx context.Context, in *ServiceStatsRequest, opts ...grpc.CallOption) (*ServiceStatsResponse, error) +} + +type authNActivesClient struct { + cc *grpc.ClientConn +} + +func NewAuthNActivesClient(cc *grpc.ClientConn) AuthNActivesClient { + return &authNActivesClient{cc} +} + +func (c *authNActivesClient) ServiceStats(ctx context.Context, in *ServiceStatsRequest, opts ...grpc.CallOption) (*ServiceStatsResponse, error) { + out := new(ServiceStatsResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.AuthNActives/ServiceStats", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) - } +// AuthNActivesServer is the server API for AuthNActives service. +type AuthNActivesServer interface { + ServiceStats(context.Context, *ServiceStatsRequest) (*ServiceStatsResponse, error) +} + +func RegisterAuthNActivesServer(s *grpc.Server, srv AuthNActivesServer) { + s.RegisterService(&_AuthNActives_serviceDesc, srv) +} + +func _AuthNActives_ServiceStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServiceStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthNActivesServer).ServiceStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keratin.authn.AuthNActives/ServiceStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthNActivesServer).ServiceStats(ctx, req.(*ServiceStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AuthNActives_serviceDesc = grpc.ServiceDesc{ + ServiceName: "keratin.authn.AuthNActives", + HandlerType: (*AuthNActivesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ServiceStats", + Handler: _AuthNActives_ServiceStats_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn-private.proto", +} + +func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } return i, nil } @@ -1658,11 +2715,10 @@ func (m *UpdateAccountRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa + if m.Id != 0 { + dAtA[i] = 0x8 i++ - i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) } if len(m.Username) > 0 { dAtA[i] = 0x12 @@ -1673,6 +2729,24 @@ func (m *UpdateAccountRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *UpdateAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + func (m *LockAccountRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1688,12 +2762,29 @@ func (m *LockAccountRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa + if m.Id != 0 { + dAtA[i] = 0x8 i++ - i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } + return i, nil +} + +func (m *LockAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *LockAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l return i, nil } @@ -1712,12 +2803,29 @@ func (m *UnlockAccountRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa + if m.Id != 0 { + dAtA[i] = 0x8 i++ - i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } + return i, nil +} + +func (m *UnlockAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *UnlockAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l return i, nil } @@ -1736,12 +2844,29 @@ func (m *ArchiveAccountRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Id) > 0 { - dAtA[i] = 0xa + if m.Id != 0 { + dAtA[i] = 0x8 i++ - i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } + return i, nil +} + +func (m *ArchiveAccountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ArchiveAccountResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l return i, nil } @@ -1851,12 +2976,149 @@ func (m *ExpirePasswordRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Id) > 0 { + if m.Id != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(m.Id)) + } + return i, nil +} + +func (m *ExpirePasswordResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpirePasswordResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *JWKSRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *JWKSRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *Key) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Key) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Use) > 0 { dAtA[i] = 0xa i++ - i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Id))) - i += copy(dAtA[i:], m.Id) + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Use))) + i += copy(dAtA[i:], m.Use) + } + if len(m.Alg) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Alg))) + i += copy(dAtA[i:], m.Alg) + } + if len(m.Kty) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Kty))) + i += copy(dAtA[i:], m.Kty) + } + if len(m.Kid) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Kid))) + i += copy(dAtA[i:], m.Kid) + } + if len(m.E) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.E))) + i += copy(dAtA[i:], m.E) + } + if len(m.N) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.N))) + i += copy(dAtA[i:], m.N) + } + return i, nil +} + +func (m *JWKSResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *JWKSResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Keys) > 0 { + for _, msg := range m.Keys { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ServiceStatsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ServiceStatsRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l return i, nil } @@ -1954,31 +3216,494 @@ func (m *ServiceStatsResponseActiveStats) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeVarintAuthnPrivate(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *ServiceConfigurationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return offset + 1 + return dAtA[:n], nil } -func (m *GetAccountRequest) Size() (n int) { + +func (m *ServiceConfigurationRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthnPrivate(uint64(l)) - } - return n + return i, nil } -func (m *GetAccountResponse) Size() (n int) { - var l int - _ = l - if m.Id != 0 { - n += 1 + sovAuthnPrivate(uint64(m.Id)) - } +func (m *Configuration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Configuration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Issuer) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.Issuer))) + i += copy(dAtA[i:], m.Issuer) + } + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.IdTokenSigningAlgValuesSupported) > 0 { + for _, s := range m.IdTokenSigningAlgValuesSupported { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.ClaimsSupported) > 0 { + for _, s := range m.ClaimsSupported { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.JwksUri) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintAuthnPrivate(dAtA, i, uint64(len(m.JwksUri))) + i += copy(dAtA[i:], m.JwksUri) + } + return i, nil +} + +func encodeVarintAuthnPrivate(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func NewPopulatedGetAccountRequest(r randyAuthnPrivate, easy bool) *GetAccountRequest { + this := &GetAccountRequest{} + this.Id = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Id *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedGetAccountResponse(r randyAuthnPrivate, easy bool) *GetAccountResponse { + this := &GetAccountResponse{} + this.Id = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Id *= -1 + } + this.Username = string(randStringAuthnPrivate(r)) + this.Locked = bool(bool(r.Intn(2) == 0)) + this.Deleted = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedGetAccountResponseEnvelope(r randyAuthnPrivate, easy bool) *GetAccountResponseEnvelope { + this := &GetAccountResponseEnvelope{} + if r.Intn(10) != 0 { + this.Result = NewPopulatedGetAccountResponse(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUpdateAccountRequest(r randyAuthnPrivate, easy bool) *UpdateAccountRequest { + this := &UpdateAccountRequest{} + this.Id = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Id *= -1 + } + this.Username = string(randStringAuthnPrivate(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUpdateAccountResponse(r randyAuthnPrivate, easy bool) *UpdateAccountResponse { + this := &UpdateAccountResponse{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedLockAccountRequest(r randyAuthnPrivate, easy bool) *LockAccountRequest { + this := &LockAccountRequest{} + this.Id = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Id *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedLockAccountResponse(r randyAuthnPrivate, easy bool) *LockAccountResponse { + this := &LockAccountResponse{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnlockAccountRequest(r randyAuthnPrivate, easy bool) *UnlockAccountRequest { + this := &UnlockAccountRequest{} + this.Id = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Id *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnlockAccountResponse(r randyAuthnPrivate, easy bool) *UnlockAccountResponse { + this := &UnlockAccountResponse{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedArchiveAccountRequest(r randyAuthnPrivate, easy bool) *ArchiveAccountRequest { + this := &ArchiveAccountRequest{} + this.Id = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Id *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedArchiveAccountResponse(r randyAuthnPrivate, easy bool) *ArchiveAccountResponse { + this := &ArchiveAccountResponse{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedImportAccountRequst(r randyAuthnPrivate, easy bool) *ImportAccountRequst { + this := &ImportAccountRequst{} + this.Username = string(randStringAuthnPrivate(r)) + this.Password = string(randStringAuthnPrivate(r)) + this.Locked = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedImportAccountResponse(r randyAuthnPrivate, easy bool) *ImportAccountResponse { + this := &ImportAccountResponse{} + this.Id = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Id *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedImportAccountResponseEnvelope(r randyAuthnPrivate, easy bool) *ImportAccountResponseEnvelope { + this := &ImportAccountResponseEnvelope{} + if r.Intn(10) != 0 { + this.Result = NewPopulatedImportAccountResponse(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedExpirePasswordRequest(r randyAuthnPrivate, easy bool) *ExpirePasswordRequest { + this := &ExpirePasswordRequest{} + this.Id = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Id *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedExpirePasswordResponse(r randyAuthnPrivate, easy bool) *ExpirePasswordResponse { + this := &ExpirePasswordResponse{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedJWKSRequest(r randyAuthnPrivate, easy bool) *JWKSRequest { + this := &JWKSRequest{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedKey(r randyAuthnPrivate, easy bool) *Key { + this := &Key{} + this.Use = string(randStringAuthnPrivate(r)) + this.Alg = string(randStringAuthnPrivate(r)) + this.Kty = string(randStringAuthnPrivate(r)) + this.Kid = string(randStringAuthnPrivate(r)) + this.E = string(randStringAuthnPrivate(r)) + this.N = string(randStringAuthnPrivate(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedJWKSResponse(r randyAuthnPrivate, easy bool) *JWKSResponse { + this := &JWKSResponse{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.Keys = make([]*Key, v1) + for i := 0; i < v1; i++ { + this.Keys[i] = NewPopulatedKey(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedServiceStatsRequest(r randyAuthnPrivate, easy bool) *ServiceStatsRequest { + this := &ServiceStatsRequest{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedServiceStatsResponse(r randyAuthnPrivate, easy bool) *ServiceStatsResponse { + this := &ServiceStatsResponse{} + if r.Intn(10) != 0 { + this.Actives = NewPopulatedServiceStatsResponseActiveStats(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedServiceStatsResponseActiveStats(r randyAuthnPrivate, easy bool) *ServiceStatsResponseActiveStats { + this := &ServiceStatsResponseActiveStats{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Daily = make(map[string]int64) + for i := 0; i < v2; i++ { + v3 := randStringAuthnPrivate(r) + this.Daily[v3] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Daily[v3] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Weekly = make(map[string]int64) + for i := 0; i < v4; i++ { + v5 := randStringAuthnPrivate(r) + this.Weekly[v5] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Weekly[v5] *= -1 + } + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Monthly = make(map[string]int64) + for i := 0; i < v6; i++ { + v7 := randStringAuthnPrivate(r) + this.Monthly[v7] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Monthly[v7] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedServiceConfigurationRequest(r randyAuthnPrivate, easy bool) *ServiceConfigurationRequest { + this := &ServiceConfigurationRequest{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedConfiguration(r randyAuthnPrivate, easy bool) *Configuration { + this := &Configuration{} + this.Issuer = string(randStringAuthnPrivate(r)) + v8 := r.Intn(10) + this.ResponseTypesSupported = make([]string, v8) + for i := 0; i < v8; i++ { + this.ResponseTypesSupported[i] = string(randStringAuthnPrivate(r)) + } + v9 := r.Intn(10) + this.SubjectTypesSupported = make([]string, v9) + for i := 0; i < v9; i++ { + this.SubjectTypesSupported[i] = string(randStringAuthnPrivate(r)) + } + v10 := r.Intn(10) + this.IdTokenSigningAlgValuesSupported = make([]string, v10) + for i := 0; i < v10; i++ { + this.IdTokenSigningAlgValuesSupported[i] = string(randStringAuthnPrivate(r)) + } + v11 := r.Intn(10) + this.ClaimsSupported = make([]string, v11) + for i := 0; i < v11; i++ { + this.ClaimsSupported[i] = string(randStringAuthnPrivate(r)) + } + this.JwksUri = string(randStringAuthnPrivate(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyAuthnPrivate interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAuthnPrivate(r randyAuthnPrivate) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringAuthnPrivate(r randyAuthnPrivate) string { + v12 := r.Intn(100) + tmps := make([]rune, v12) + for i := 0; i < v12; i++ { + tmps[i] = randUTF8RuneAuthnPrivate(r) + } + return string(tmps) +} +func randUnrecognizedAuthnPrivate(r randyAuthnPrivate, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldAuthnPrivate(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldAuthnPrivate(dAtA []byte, r randyAuthnPrivate, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateAuthnPrivate(dAtA, uint64(key)) + v13 := r.Int63() + if r.Intn(2) == 0 { + v13 *= -1 + } + dAtA = encodeVarintPopulateAuthnPrivate(dAtA, uint64(v13)) + case 1: + dAtA = encodeVarintPopulateAuthnPrivate(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateAuthnPrivate(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateAuthnPrivate(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateAuthnPrivate(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateAuthnPrivate(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *GetAccountRequest) Size() (n int) { + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) + } + return n +} + +func (m *GetAccountResponse) Size() (n int) { + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) + } l = len(m.Username) if l > 0 { n += 1 + l + sovAuthnPrivate(uint64(l)) @@ -2005,9 +3730,8 @@ func (m *GetAccountResponseEnvelope) Size() (n int) { func (m *UpdateAccountRequest) Size() (n int) { var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthnPrivate(uint64(l)) + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) } l = len(m.Username) if l > 0 { @@ -2016,36 +3740,57 @@ func (m *UpdateAccountRequest) Size() (n int) { return n } +func (m *UpdateAccountResponse) Size() (n int) { + var l int + _ = l + return n +} + func (m *LockAccountRequest) Size() (n int) { var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthnPrivate(uint64(l)) + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) } return n } +func (m *LockAccountResponse) Size() (n int) { + var l int + _ = l + return n +} + func (m *UnlockAccountRequest) Size() (n int) { var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthnPrivate(uint64(l)) + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) } return n } +func (m *UnlockAccountResponse) Size() (n int) { + var l int + _ = l + return n +} + func (m *ArchiveAccountRequest) Size() (n int) { var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthnPrivate(uint64(l)) + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) } return n } +func (m *ArchiveAccountResponse) Size() (n int) { + var l int + _ = l + return n +} + func (m *ImportAccountRequst) Size() (n int) { var l int _ = l @@ -2085,32 +3830,91 @@ func (m *ImportAccountResponseEnvelope) Size() (n int) { func (m *ExpirePasswordRequest) Size() (n int) { var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovAuthnPrivate(uint64(l)) + if m.Id != 0 { + n += 1 + sovAuthnPrivate(uint64(m.Id)) } return n } -func (m *ServiceStatsResponse) Size() (n int) { +func (m *ExpirePasswordResponse) Size() (n int) { var l int _ = l - if m.Actives != nil { - l = m.Actives.Size() + return n +} + +func (m *JWKSRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *Key) Size() (n int) { + var l int + _ = l + l = len(m.Use) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.Alg) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.Kty) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.Kid) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.E) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + l = len(m.N) + if l > 0 { n += 1 + l + sovAuthnPrivate(uint64(l)) } return n } -func (m *ServiceStatsResponseActiveStats) Size() (n int) { +func (m *JWKSResponse) Size() (n int) { var l int _ = l - if len(m.Daily) > 0 { - for k, v := range m.Daily { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) - n += mapEntrySize + 1 + sovAuthnPrivate(uint64(mapEntrySize)) + if len(m.Keys) > 0 { + for _, e := range m.Keys { + l = e.Size() + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + } + return n +} + +func (m *ServiceStatsRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ServiceStatsResponse) Size() (n int) { + var l int + _ = l + if m.Actives != nil { + l = m.Actives.Size() + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + +func (m *ServiceStatsResponseActiveStats) Size() (n int) { + var l int + _ = l + if len(m.Daily) > 0 { + for k, v := range m.Daily { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovAuthnPrivate(uint64(len(k))) + 1 + sovAuthnPrivate(uint64(v)) + n += mapEntrySize + 1 + sovAuthnPrivate(uint64(mapEntrySize)) } } if len(m.Weekly) > 0 { @@ -2132,6 +3936,50 @@ func (m *ServiceStatsResponseActiveStats) Size() (n int) { return n } +func (m *ServiceConfigurationRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *Configuration) Size() (n int) { + var l int + _ = l + l = len(m.Issuer) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + l = len(s) + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + } + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + l = len(s) + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + } + if len(m.IdTokenSigningAlgValuesSupported) > 0 { + for _, s := range m.IdTokenSigningAlgValuesSupported { + l = len(s) + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + } + if len(m.ClaimsSupported) > 0 { + for _, s := range m.ClaimsSupported { + l = len(s) + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + } + l = len(m.JwksUri) + if l > 0 { + n += 1 + l + sovAuthnPrivate(uint64(l)) + } + return n +} + func sovAuthnPrivate(x uint64) (n int) { for { n++ @@ -2189,6 +4037,15 @@ func (this *UpdateAccountRequest) String() string { }, "") return s } +func (this *UpdateAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAccountResponse{`, + `}`, + }, "") + return s +} func (this *LockAccountRequest) String() string { if this == nil { return "nil" @@ -2199,6 +4056,15 @@ func (this *LockAccountRequest) String() string { }, "") return s } +func (this *LockAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LockAccountResponse{`, + `}`, + }, "") + return s +} func (this *UnlockAccountRequest) String() string { if this == nil { return "nil" @@ -2209,6 +4075,15 @@ func (this *UnlockAccountRequest) String() string { }, "") return s } +func (this *UnlockAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnlockAccountResponse{`, + `}`, + }, "") + return s +} func (this *ArchiveAccountRequest) String() string { if this == nil { return "nil" @@ -2219,6 +4094,15 @@ func (this *ArchiveAccountRequest) String() string { }, "") return s } +func (this *ArchiveAccountResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ArchiveAccountResponse{`, + `}`, + }, "") + return s +} func (this *ImportAccountRequst) String() string { if this == nil { return "nil" @@ -2261,6 +4145,58 @@ func (this *ExpirePasswordRequest) String() string { }, "") return s } +func (this *ExpirePasswordResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExpirePasswordResponse{`, + `}`, + }, "") + return s +} +func (this *JWKSRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&JWKSRequest{`, + `}`, + }, "") + return s +} +func (this *Key) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Key{`, + `Use:` + fmt.Sprintf("%v", this.Use) + `,`, + `Alg:` + fmt.Sprintf("%v", this.Alg) + `,`, + `Kty:` + fmt.Sprintf("%v", this.Kty) + `,`, + `Kid:` + fmt.Sprintf("%v", this.Kid) + `,`, + `E:` + fmt.Sprintf("%v", this.E) + `,`, + `N:` + fmt.Sprintf("%v", this.N) + `,`, + `}`, + }, "") + return s +} +func (this *JWKSResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&JWKSResponse{`, + `Keys:` + strings.Replace(fmt.Sprintf("%v", this.Keys), "Key", "Key", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceStatsRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceStatsRequest{`, + `}`, + }, "") + return s +} func (this *ServiceStatsResponse) String() string { if this == nil { return "nil" @@ -2299,29 +4235,729 @@ func (this *ServiceStatsResponseActiveStats) String() string { for k, _ := range this.Monthly { keysForMonthly = append(keysForMonthly, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForMonthly) - mapStringForMonthly := "map[string]int64{" - for _, k := range keysForMonthly { - mapStringForMonthly += fmt.Sprintf("%v: %v,", k, this.Monthly[k]) + github_com_gogo_protobuf_sortkeys.Strings(keysForMonthly) + mapStringForMonthly := "map[string]int64{" + for _, k := range keysForMonthly { + mapStringForMonthly += fmt.Sprintf("%v: %v,", k, this.Monthly[k]) + } + mapStringForMonthly += "}" + s := strings.Join([]string{`&ServiceStatsResponseActiveStats{`, + `Daily:` + mapStringForDaily + `,`, + `Weekly:` + mapStringForWeekly + `,`, + `Monthly:` + mapStringForMonthly + `,`, + `}`, + }, "") + return s +} +func (this *ServiceConfigurationRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceConfigurationRequest{`, + `}`, + }, "") + return s +} +func (this *Configuration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Configuration{`, + `Issuer:` + fmt.Sprintf("%v", this.Issuer) + `,`, + `ResponseTypesSupported:` + fmt.Sprintf("%v", this.ResponseTypesSupported) + `,`, + `SubjectTypesSupported:` + fmt.Sprintf("%v", this.SubjectTypesSupported) + `,`, + `IdTokenSigningAlgValuesSupported:` + fmt.Sprintf("%v", this.IdTokenSigningAlgValuesSupported) + `,`, + `ClaimsSupported:` + fmt.Sprintf("%v", this.ClaimsSupported) + `,`, + `JwksUri:` + fmt.Sprintf("%v", this.JwksUri) + `,`, + `}`, + }, "") + return s +} +func valueToStringAuthnPrivate(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Locked = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Deleted = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAccountResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &GetAccountResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LockAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LockAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LockAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LockAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnlockAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnlockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } - mapStringForMonthly += "}" - s := strings.Join([]string{`&ServiceStatsResponseActiveStats{`, - `Daily:` + mapStringForDaily + `,`, - `Weekly:` + mapStringForWeekly + `,`, - `Monthly:` + mapStringForMonthly + `,`, - `}`, - }, "") - return s + return nil } -func valueToStringAuthnPrivate(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" +func (m *UnlockAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnlockAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnlockAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { +func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2344,17 +4980,17 @@ func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ArchiveAccountRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ArchiveAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var stringLen uint64 + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthnPrivate @@ -2364,21 +5000,61 @@ func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + m.Id |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { return ErrInvalidLengthAuthnPrivate } - postIndex := iNdEx + intStringLen - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ArchiveAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ArchiveAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ArchiveAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) @@ -2400,7 +5076,7 @@ func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { +func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2423,17 +5099,17 @@ func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ImportAccountRequst: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ImportAccountRequst: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) } - m.Id = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthnPrivate @@ -2443,14 +5119,24 @@ func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= (int64(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2475,7 +5161,7 @@ func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Username = string(dAtA[iNdEx:postIndex]) + m.Password = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { @@ -2497,26 +5183,6 @@ func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { } } m.Locked = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthnPrivate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Deleted = bool(v != 0) default: iNdEx = preIndex skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) @@ -2538,7 +5204,7 @@ func (m *GetAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { +func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2561,17 +5227,17 @@ func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAccountResponseEnvelope: wiretype end group for non-group") + return fmt.Errorf("proto: ImportAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ImportAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var msglen int + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthnPrivate @@ -2581,25 +5247,11 @@ func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + m.Id |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthAuthnPrivate - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &GetAccountResponse{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) @@ -2621,7 +5273,7 @@ func (m *GetAccountResponseEnvelope) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { +func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2644,17 +5296,17 @@ func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UpdateAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ImportAccountResponseEnvelope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ImportAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthnPrivate @@ -2664,49 +5316,24 @@ func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuthnPrivate } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthnPrivate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthnPrivate - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + if m.Result == nil { + m.Result = &ImportAccountResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Username = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2729,7 +5356,7 @@ func (m *UpdateAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { +func (m *ExpirePasswordRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2752,17 +5379,17 @@ func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LockAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ExpirePasswordRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExpirePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var stringLen uint64 + m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthnPrivate @@ -2772,21 +5399,11 @@ func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + m.Id |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthnPrivate - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) @@ -2808,7 +5425,7 @@ func (m *LockAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { +func (m *ExpirePasswordResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2831,41 +5448,12 @@ func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UnlockAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ExpirePasswordResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UnlockAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExpirePasswordResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthnPrivate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthnPrivate - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) @@ -2887,7 +5475,7 @@ func (m *UnlockAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { +func (m *JWKSRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2910,41 +5498,12 @@ func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ArchiveAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: JWKSRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ArchiveAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: JWKSRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthnPrivate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthnPrivate - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) @@ -2966,7 +5525,7 @@ func (m *ArchiveAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { +func (m *Key) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2989,15 +5548,15 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImportAccountRequst: wiretype end group for non-group") + return fmt.Errorf("proto: Key: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountRequst: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Key: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Use", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3022,11 +5581,11 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Username = string(dAtA[iNdEx:postIndex]) + m.Use = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Alg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3051,13 +5610,13 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Password = string(dAtA[iNdEx:postIndex]) + m.Alg = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Locked", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kty", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthnPrivate @@ -3067,67 +5626,84 @@ func (m *ImportAccountRequst) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - m.Locked = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthAuthnPrivate } - if (iNdEx + skippy) > l { + postIndex := iNdEx + intStringLen + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthnPrivate + m.Kty = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kid", wireType) } - if iNdEx >= l { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break + m.Kid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field E", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImportAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - m.Id = 0 + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.E = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthnPrivate @@ -3137,11 +5713,21 @@ func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= (int64(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.N = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) @@ -3163,7 +5749,7 @@ func (m *ImportAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { +func (m *JWKSResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3186,15 +5772,15 @@ func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImportAccountResponseEnvelope: wiretype end group for non-group") + return fmt.Errorf("proto: JWKSResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImportAccountResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: JWKSResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3218,10 +5804,8 @@ func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Result == nil { - m.Result = &ImportAccountResponse{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Keys = append(m.Keys, &Key{}) + if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3246,7 +5830,7 @@ func (m *ImportAccountResponseEnvelope) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExpirePasswordRequest) Unmarshal(dAtA []byte) error { +func (m *ServiceStatsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3269,41 +5853,12 @@ func (m *ExpirePasswordRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExpirePasswordRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ServiceStatsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExpirePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ServiceStatsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthnPrivate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthnPrivate - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + switch fieldNum { default: iNdEx = preIndex skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) @@ -3779,6 +6334,280 @@ func (m *ServiceStatsResponseActiveStats) Unmarshal(dAtA []byte) error { } return nil } +func (m *ServiceConfigurationRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceConfigurationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceConfigurationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Configuration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Configuration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Configuration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Issuer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResponseTypesSupported = append(m.ResponseTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubjectTypesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubjectTypesSupported = append(m.SubjectTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdTokenSigningAlgValuesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdTokenSigningAlgValuesSupported = append(m.IdTokenSigningAlgValuesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimsSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClaimsSupported = append(m.ClaimsSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JwksUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthnPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthnPrivate + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JwksUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthnPrivate(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthnPrivate + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipAuthnPrivate(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 @@ -3884,61 +6713,88 @@ var ( ErrIntOverflowAuthnPrivate = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("authn-private.proto", fileDescriptor_authn_private_d4727a028c8ad90a) } - -var fileDescriptor_authn_private_d4727a028c8ad90a = []byte{ - // 843 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcd, 0x6e, 0xf3, 0x54, - 0x10, 0x8d, 0x93, 0x7e, 0x69, 0x98, 0xe4, 0x8b, 0xca, 0x6d, 0x92, 0x9a, 0x5b, 0x6a, 0x22, 0x17, - 0xb5, 0x55, 0xa5, 0xda, 0x28, 0x65, 0x51, 0xb2, 0x4b, 0x45, 0x04, 0x08, 0xa8, 0x50, 0x4a, 0x85, - 0x84, 0x40, 0x95, 0x6b, 0x5f, 0x12, 0x2b, 0x8e, 0xaf, 0xb1, 0xaf, 0x53, 0x22, 0x84, 0x84, 0xfa, - 0x04, 0x48, 0x3c, 0x03, 0x88, 0x47, 0x61, 0x59, 0x89, 0x0d, 0x2b, 0x44, 0x03, 0x0b, 0xc4, 0xaa, - 0x8f, 0xf0, 0xc9, 0xd7, 0x76, 0xe2, 0x24, 0x76, 0x7f, 0x76, 0x19, 0x7b, 0xe6, 0x9c, 0x99, 0x39, - 0x9e, 0xa3, 0xc0, 0xa6, 0xe6, 0xb3, 0x81, 0x7d, 0xe4, 0xb8, 0xe6, 0x58, 0x63, 0x44, 0x71, 0x5c, - 0xca, 0x28, 0x5a, 0xeb, 0xbb, 0x8e, 0x8e, 0xb7, 0xfb, 0x94, 0xf6, 0x2d, 0xa2, 0xf2, 0x67, 0x57, - 0xfe, 0x37, 0x2a, 0x19, 0x39, 0x6c, 0x12, 0xa6, 0xe0, 0xa3, 0xbe, 0xc9, 0x06, 0xfe, 0x95, 0xa2, - 0xd3, 0x91, 0xda, 0xa7, 0x7d, 0x3a, 0xcf, 0x0a, 0x22, 0x1e, 0xf0, 0x5f, 0x51, 0xfa, 0x9b, 0x11, - 0x96, 0xe6, 0x98, 0xaa, 0x66, 0xdb, 0x94, 0x69, 0xcc, 0xa4, 0xb6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ef, 0x3e, 0xe0, - 0x3a, 0x33, 0xbd, 0xa3, 0x7d, 0xc9, 0x1b, 0x73, 0x22, 0x93, 0x17, 0xb4, 0x85, 0x43, 0x34, 0x82, - 0xea, 0xa2, 0x25, 0xc5, 0xc3, 0xa4, 0x1a, 0x55, 0xe6, 0x30, 0x7b, 0x9c, 0xa3, 0x89, 0xa5, 0xa5, - 0x95, 0x11, 0x8e, 0x72, 0x39, 0x33, 0xe8, 0x1e, 0x54, 0x92, 0xf7, 0x8b, 0x32, 0xf0, 0x30, 0xce, - 0xbe, 0x75, 0xb9, 0xca, 0xb9, 0x4a, 0xa8, 0xa8, 0xf2, 0x73, 0x3f, 0x6d, 0xdd, 0xde, 0x49, 0xb9, - 0x3f, 0xef, 0xa4, 0xdc, 0xfd, 0x9d, 0x24, 0xfc, 0x38, 0x95, 0x84, 0xdf, 0xa6, 0x92, 0xf0, 0xfb, - 0x54, 0x12, 0x6e, 0xa7, 0x92, 0xf0, 0xf7, 0x54, 0x12, 0xfe, 0x9b, 0x4a, 0xb9, 0xfb, 0xa9, 0x24, - 0xfc, 0xf4, 0x8f, 0x94, 0xfb, 0x92, 0xff, 0x0b, 0xb9, 0x2a, 0x72, 0xbe, 0xe3, 0x57, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xef, 0xb0, 0xa6, 0xaf, 0xa9, 0x08, 0x00, 0x00, +func init() { proto.RegisterFile("authn-private.proto", fileDescriptor_authn_private_c60a8bdddc03adb9) } + +var fileDescriptor_authn_private_c60a8bdddc03adb9 = []byte{ + // 1265 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xd8, 0x89, 0x93, 0x3e, 0x3b, 0x21, 0x9d, 0xc4, 0xa9, 0xd9, 0xb6, 0x5b, 0xb3, 0xfd, + 0x95, 0x56, 0xad, 0x5d, 0x19, 0x29,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31, 0xbf, 0xa9, 0x2d, + 0xcc, 0x98, 0xdf, 0x17, 0xf4, 0x2f, 0xef, 0x72, 0xbf, 0x5b, 0x92, 0x9c, 0x58, 0x35, 0xe1, 0xf0, + 0x56, 0xd4, 0xd2, 0xed, 0x96, 0x6b, 0x53, 0x10, 0xb5, 0x03, 0x28, 0xf0, 0x63, 0x5d, 0x0f, 0xdf, + 0x7a, 0x6c, 0x40, 0x61, 0xf4, 0x4d, 0x1c, 0x3b, 0xdc, 0x29, 0x4d, 0x88, 0x74, 0xfe, 0x25, 0x1e, + 0x55, 0x65, 0x89, 0x87, 0xbc, 0x80, 0x73, 0x55, 0xfe, 0xae, 0x6e, 0x6d, 0x3c, 0x3d, 0x94, 0x67, + 0xfe, 0x38, 0x94, 0x67, 0x9e, 0x1f, 0xca, 0xe8, 0xbf, 0x43, 0x19, 0x7d, 0xd9, 0x97, 0xd1, 0xcf, + 0x7d, 0x19, 0xfd, 0xd6, 0x97, 0xd1, 0xd3, 0xbe, 0x8c, 0xfe, 0xea, 0xcb, 0xe8, 0xdf, 0xbe, 0x3c, + 0xf3, 0xbc, 0x2f, 0xa3, 0x6f, 0xff, 0x96, 0x67, 0x76, 0x67, 0x0d, 0xd7, 0xd1, 0xf6, 0x72, 0xfc, + 0x5f, 0xd2, 0xeb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x37, 0x3e, 0x45, 0x00, 0x98, 0x0d, 0x00, + 0x00, } diff --git a/grpc/authn-private.pb.gw.go b/grpc/authn-private.pb.gw.go index 8e9afc5c84..406c429fe1 100644 --- a/grpc/authn-private.pb.gw.go +++ b/grpc/authn-private.pb.gw.go @@ -12,7 +12,6 @@ import ( "io" "net/http" - "github.com/gogo/protobuf/types" "github.com/golang/protobuf/proto" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" @@ -29,7 +28,38 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -func request_AdminAuthN_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_UnsecuredAdminAuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, client UnsecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq JWKSRequest + var metadata runtime.ServerMetadata + + msg, err := client.JWKS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_UnsecuredAdminAuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, client UnsecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ServiceConfigurationRequest + var metadata runtime.ServerMetadata + + msg, err := client.ServiceConfiguration(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_SecuredAdminAuthN_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ImportAccountRequst + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ImportAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_SecuredAdminAuthN_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetAccountRequest var metadata runtime.ServerMetadata @@ -45,7 +75,7 @@ func request_AdminAuthN_GetAccount_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) + protoReq.Id, err = runtime.Int64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) @@ -56,7 +86,7 @@ func request_AdminAuthN_GetAccount_0(ctx context.Context, marshaler runtime.Mars } -func request_AdminAuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SecuredAdminAuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateAccountRequest var metadata runtime.ServerMetadata @@ -76,7 +106,7 @@ func request_AdminAuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) + protoReq.Id, err = runtime.Int64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) @@ -87,7 +117,38 @@ func request_AdminAuthN_UpdateAccount_0(ctx context.Context, marshaler runtime.M } -func request_AdminAuthN_LockAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SecuredAdminAuthN_UpdateAccount_1(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateAccountRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Username); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UpdateAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_SecuredAdminAuthN_LockAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq LockAccountRequest var metadata runtime.ServerMetadata @@ -103,7 +164,7 @@ func request_AdminAuthN_LockAccount_0(ctx context.Context, marshaler runtime.Mar return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) + protoReq.Id, err = runtime.Int64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) @@ -114,7 +175,61 @@ func request_AdminAuthN_LockAccount_0(ctx context.Context, marshaler runtime.Mar } -func request_AdminAuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SecuredAdminAuthN_LockAccount_1(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LockAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.LockAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_SecuredAdminAuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UnlockAccountRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UnlockAcount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_SecuredAdminAuthN_UnlockAcount_1(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnlockAccountRequest var metadata runtime.ServerMetadata @@ -130,7 +245,7 @@ func request_AdminAuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) + protoReq.Id, err = runtime.Int64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) @@ -141,7 +256,7 @@ func request_AdminAuthN_UnlockAcount_0(ctx context.Context, marshaler runtime.Ma } -func request_AdminAuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SecuredAdminAuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ArchiveAccountRequest var metadata runtime.ServerMetadata @@ -157,7 +272,7 @@ func request_AdminAuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) + protoReq.Id, err = runtime.Int64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) @@ -168,20 +283,34 @@ func request_AdminAuthN_ArchiveAccount_0(ctx context.Context, marshaler runtime. } -func request_AdminAuthN_ImportAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportAccountRequst +func request_SecuredAdminAuthN_ExpirePassword_0(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExpirePasswordRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - msg, err := client.ImportAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + protoReq.Id, err = runtime.Int64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ExpirePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func request_AdminAuthN_ExpirePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SecuredAdminAuthN_ExpirePassword_1(ctx context.Context, marshaler runtime.Marshaler, client SecuredAdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ExpirePasswordRequest var metadata runtime.ServerMetadata @@ -197,7 +326,7 @@ func request_AdminAuthN_ExpirePassword_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) + protoReq.Id, err = runtime.Int64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) @@ -208,8 +337,8 @@ func request_AdminAuthN_ExpirePassword_0(ctx context.Context, marshaler runtime. } -func request_AdminAuthN_ServiceStats_0(ctx context.Context, marshaler runtime.Marshaler, client AdminAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty +func request_AuthNActives_ServiceStats_0(ctx context.Context, marshaler runtime.Marshaler, client AuthNActivesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ServiceStatsRequest var metadata runtime.ServerMetadata msg, err := client.ServiceStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -217,9 +346,102 @@ func request_AdminAuthN_ServiceStats_0(ctx context.Context, marshaler runtime.Ma } -// RegisterAdminAuthNHandlerFromEndpoint is same as RegisterAdminAuthNHandler but +// RegisterUnsecuredAdminAuthNHandlerFromEndpoint is same as RegisterUnsecuredAdminAuthNHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterUnsecuredAdminAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterUnsecuredAdminAuthNHandler(ctx, mux, conn) +} + +// RegisterUnsecuredAdminAuthNHandler registers the http handlers for service UnsecuredAdminAuthN to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterUnsecuredAdminAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterUnsecuredAdminAuthNHandlerClient(ctx, mux, NewUnsecuredAdminAuthNClient(conn)) +} + +// RegisterUnsecuredAdminAuthNHandlerClient registers the http handlers for service UnsecuredAdminAuthN +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UnsecuredAdminAuthNClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UnsecuredAdminAuthNClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "UnsecuredAdminAuthNClient" to call the correct interceptors. +func RegisterUnsecuredAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UnsecuredAdminAuthNClient) error { + + mux.Handle("GET", pattern_UnsecuredAdminAuthN_JWKS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_UnsecuredAdminAuthN_JWKS_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_UnsecuredAdminAuthN_JWKS_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_UnsecuredAdminAuthN_ServiceConfiguration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_UnsecuredAdminAuthN_ServiceConfiguration_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_UnsecuredAdminAuthN_ServiceConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_UnsecuredAdminAuthN_JWKS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"jwks"}, "")) + + pattern_UnsecuredAdminAuthN_ServiceConfiguration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"configuration"}, "")) +) + +var ( + forward_UnsecuredAdminAuthN_JWKS_0 = runtime.ForwardResponseMessage + + forward_UnsecuredAdminAuthN_ServiceConfiguration_0 = runtime.ForwardResponseMessage +) + +// RegisterSecuredAdminAuthNHandlerFromEndpoint is same as RegisterSecuredAdminAuthNHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAdminAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterSecuredAdminAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err @@ -239,23 +461,63 @@ func RegisterAdminAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.Ser }() }() - return RegisterAdminAuthNHandler(ctx, mux, conn) + return RegisterSecuredAdminAuthNHandler(ctx, mux, conn) } -// RegisterAdminAuthNHandler registers the http handlers for service AdminAuthN to "mux". +// RegisterSecuredAdminAuthNHandler registers the http handlers for service SecuredAdminAuthN to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterAdminAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAdminAuthNHandlerClient(ctx, mux, NewAdminAuthNClient(conn)) +func RegisterSecuredAdminAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSecuredAdminAuthNHandlerClient(ctx, mux, NewSecuredAdminAuthNClient(conn)) } -// RegisterAdminAuthNHandlerClient registers the http handlers for service AdminAuthN -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AdminAuthNClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AdminAuthNClient" +// RegisterSecuredAdminAuthNHandlerClient registers the http handlers for service SecuredAdminAuthN +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecuredAdminAuthNClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecuredAdminAuthNClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AdminAuthNClient" to call the correct interceptors. -func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdminAuthNClient) error { +// "SecuredAdminAuthNClient" to call the correct interceptors. +func RegisterSecuredAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecuredAdminAuthNClient) error { + + mux.Handle("POST", pattern_SecuredAdminAuthN_ImportAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecuredAdminAuthN_ImportAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecuredAdminAuthN_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SecuredAdminAuthN_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecuredAdminAuthN_GetAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecuredAdminAuthN_GetAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) - mux.Handle("GET", pattern_AdminAuthN_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_SecuredAdminAuthN_UpdateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -264,18 +526,18 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AdminAuthN_GetAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SecuredAdminAuthN_UpdateAccount_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AdminAuthN_GetAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SecuredAdminAuthN_UpdateAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_AdminAuthN_UpdateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_SecuredAdminAuthN_UpdateAccount_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -284,18 +546,18 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AdminAuthN_UpdateAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SecuredAdminAuthN_UpdateAccount_1(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AdminAuthN_UpdateAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SecuredAdminAuthN_UpdateAccount_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_AdminAuthN_LockAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_SecuredAdminAuthN_LockAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -304,18 +566,18 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AdminAuthN_LockAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SecuredAdminAuthN_LockAccount_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AdminAuthN_LockAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SecuredAdminAuthN_LockAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_AdminAuthN_UnlockAcount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_SecuredAdminAuthN_LockAccount_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -324,18 +586,18 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AdminAuthN_UnlockAcount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SecuredAdminAuthN_LockAccount_1(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AdminAuthN_UnlockAcount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SecuredAdminAuthN_LockAccount_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AdminAuthN_ArchiveAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_SecuredAdminAuthN_UnlockAcount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -344,18 +606,18 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AdminAuthN_ArchiveAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SecuredAdminAuthN_UnlockAcount_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AdminAuthN_ArchiveAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SecuredAdminAuthN_UnlockAcount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AdminAuthN_ImportAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_SecuredAdminAuthN_UnlockAcount_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -364,18 +626,18 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AdminAuthN_ImportAccount_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SecuredAdminAuthN_UnlockAcount_1(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AdminAuthN_ImportAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SecuredAdminAuthN_UnlockAcount_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_AdminAuthN_ExpirePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_SecuredAdminAuthN_ArchiveAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -384,18 +646,18 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AdminAuthN_ExpirePassword_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SecuredAdminAuthN_ArchiveAccount_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AdminAuthN_ExpirePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SecuredAdminAuthN_ArchiveAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AdminAuthN_ServiceStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_SecuredAdminAuthN_ExpirePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -404,14 +666,34 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AdminAuthN_ServiceStats_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SecuredAdminAuthN_ExpirePassword_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_AdminAuthN_ServiceStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SecuredAdminAuthN_ExpirePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_SecuredAdminAuthN_ExpirePassword_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecuredAdminAuthN_ExpirePassword_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecuredAdminAuthN_ExpirePassword_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -419,37 +701,118 @@ func RegisterAdminAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( - pattern_AdminAuthN_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + pattern_SecuredAdminAuthN_ImportAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "import"}, "")) + + pattern_SecuredAdminAuthN_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + + pattern_SecuredAdminAuthN_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - pattern_AdminAuthN_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + pattern_SecuredAdminAuthN_UpdateAccount_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - pattern_AdminAuthN_LockAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "lock"}, "")) + pattern_SecuredAdminAuthN_LockAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "lock"}, "")) - pattern_AdminAuthN_UnlockAcount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "unlock"}, "")) + pattern_SecuredAdminAuthN_LockAccount_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "lock"}, "")) - pattern_AdminAuthN_ArchiveAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) + pattern_SecuredAdminAuthN_UnlockAcount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "unlock"}, "")) - pattern_AdminAuthN_ImportAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "import"}, "")) + pattern_SecuredAdminAuthN_UnlockAcount_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "unlock"}, "")) - pattern_AdminAuthN_ExpirePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "expire_password"}, "")) + pattern_SecuredAdminAuthN_ArchiveAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"accounts", "id"}, "")) - pattern_AdminAuthN_ServiceStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"stats"}, "")) + pattern_SecuredAdminAuthN_ExpirePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "expire_password"}, "")) + + pattern_SecuredAdminAuthN_ExpirePassword_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"accounts", "id", "expire_password"}, "")) ) var ( - forward_AdminAuthN_GetAccount_0 = runtime.ForwardResponseMessage + forward_SecuredAdminAuthN_ImportAccount_0 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_GetAccount_0 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_UpdateAccount_0 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_UpdateAccount_1 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_LockAccount_0 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_LockAccount_1 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_UnlockAcount_0 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_UnlockAcount_1 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_ArchiveAccount_0 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_ExpirePassword_0 = runtime.ForwardResponseMessage + + forward_SecuredAdminAuthN_ExpirePassword_1 = runtime.ForwardResponseMessage +) + +// RegisterAuthNActivesHandlerFromEndpoint is same as RegisterAuthNActivesHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAuthNActivesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAuthNActivesHandler(ctx, mux, conn) +} - forward_AdminAuthN_UpdateAccount_0 = runtime.ForwardResponseMessage +// RegisterAuthNActivesHandler registers the http handlers for service AuthNActives to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAuthNActivesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAuthNActivesHandlerClient(ctx, mux, NewAuthNActivesClient(conn)) +} + +// RegisterAuthNActivesHandlerClient registers the http handlers for service AuthNActives +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthNActivesClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthNActivesClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AuthNActivesClient" to call the correct interceptors. +func RegisterAuthNActivesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthNActivesClient) error { - forward_AdminAuthN_LockAccount_0 = runtime.ForwardResponseMessage + mux.Handle("GET", pattern_AuthNActives_ServiceStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthNActives_ServiceStats_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } - forward_AdminAuthN_UnlockAcount_0 = runtime.ForwardResponseMessage + forward_AuthNActives_ServiceStats_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - forward_AdminAuthN_ArchiveAccount_0 = runtime.ForwardResponseMessage + }) - forward_AdminAuthN_ImportAccount_0 = runtime.ForwardResponseMessage + return nil +} - forward_AdminAuthN_ExpirePassword_0 = runtime.ForwardResponseMessage +var ( + pattern_AuthNActives_ServiceStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"stats"}, "")) +) - forward_AdminAuthN_ServiceStats_0 = runtime.ForwardResponseMessage +var ( + forward_AuthNActives_ServiceStats_0 = runtime.ForwardResponseMessage ) diff --git a/grpc/authn-private.proto b/grpc/authn-private.proto index 9b2260d0ac..17176c1943 100644 --- a/grpc/authn-private.proto +++ b/grpc/authn-private.proto @@ -1,34 +1,39 @@ syntax = "proto3"; -package grpc; +package keratin.authn; option go_package = "grpc"; -import "google/protobuf/empty.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "google/api/annotations.proto"; -message GetAccountRequest { string id = 1; } +option (gogoproto.populate_all) = true; + +message GetAccountRequest { int64 id = 1; } message GetAccountResponse { int64 id = 1; string username = 2; - bool locked = 3; - bool deleted = 4; + bool locked = 3 [(gogoproto.jsontag) = "locked" ]; + bool deleted = 4 [(gogoproto.jsontag) = "deleted" ]; } message GetAccountResponseEnvelope { GetAccountResponse result = 1; } message UpdateAccountRequest { - string id = 1; + int64 id = 1; string username = 2; } +message UpdateAccountResponse {} -message LockAccountRequest { string id = 1; } +message LockAccountRequest { int64 id = 1; } +message LockAccountResponse {} -message UnlockAccountRequest { string id = 1; } +message UnlockAccountRequest { int64 id = 1; } +message UnlockAccountResponse {} -message ArchiveAccountRequest { string id = 1; } +message ArchiveAccountRequest { int64 id = 1; } +message ArchiveAccountResponse {} message ImportAccountRequst { string username = 1; @@ -39,66 +44,118 @@ message ImportAccountResponse { int64 id = 1 [ (gogoproto.jsontag) = "id" ]; } message ImportAccountResponseEnvelope { ImportAccountResponse result = 1; } +message ExpirePasswordRequest { int64 id = 1; } +message ExpirePasswordResponse {} + +message JWKSRequest {} +message Key { + string use = 1; + string alg = 2; + string kty = 3; + string kid = 4; + string e = 5; + string n = 6; +} +message JWKSResponse { repeated Key keys = 1; } -message ExpirePasswordRequest { string id = 1; } - +message ServiceStatsRequest {} message ServiceStatsResponse { - message active_stats { - map daily = 1; - map weekly = 2; - map monthly = 3; - } - active_stats actives = 1; + message active_stats { + map daily = 1; + map weekly = 2; + map monthly = 3; + } + active_stats actives = 1; +} + +message ServiceConfigurationRequest {} +message Configuration { + string issuer = 1; + repeated string response_types_supported = 2; + repeated string subject_types_supported = 3; + repeated string id_token_signing_alg_values_supported = 4; + repeated string claims_supported = 5; + string jwks_uri = 6; } -service AdminAuthN { +service UnsecuredAdminAuthN { + rpc JWKS(JWKSRequest) returns (JWKSResponse) { + option (google.api.http) = { + get : "/jwks" + }; + } + + rpc ServiceConfiguration(ServiceConfigurationRequest) + returns (Configuration) { + option (google.api.http) = { + get : "/configuration" + }; + } +} + +service SecuredAdminAuthN { + rpc ImportAccount(ImportAccountRequst) + returns (ImportAccountResponseEnvelope) { + option (google.api.http) = { + post : "/accounts/import" + body : "*" + }; + } rpc GetAccount(GetAccountRequest) returns (GetAccountResponseEnvelope) { option (google.api.http) = { - get : "/accounts/{id}", + get : "/accounts/{id}" }; } - rpc UpdateAccount(UpdateAccountRequest) returns (google.protobuf.Empty) { + rpc UpdateAccount(UpdateAccountRequest) returns (UpdateAccountResponse) { option (google.api.http) = { - put : "/accounts/{id}", + put : "/accounts/{id}" body : "username" + additional_bindings : { + patch : "/accounts/{id}" + body : "username" + } }; } - rpc LockAccount(LockAccountRequest) returns (google.protobuf.Empty) { + rpc LockAccount(LockAccountRequest) returns (LockAccountResponse) { option (google.api.http) = { put : "/accounts/{id}/lock" + additional_bindings: { + patch: "/accounts/{id}/lock" + } }; } - rpc UnlockAcount(UnlockAccountRequest) returns (google.protobuf.Empty) { + rpc UnlockAcount(UnlockAccountRequest) returns (UnlockAccountResponse) { option (google.api.http) = { put : "/accounts/{id}/unlock" + additional_bindings: { + patch: "/accounts/{id}/unlock" + } }; } - rpc ArchiveAccount(ArchiveAccountRequest) returns (google.protobuf.Empty) { + rpc ArchiveAccount(ArchiveAccountRequest) returns (ArchiveAccountResponse) { option (google.api.http) = { delete : "/accounts/{id}" }; } - rpc ImportAccount(ImportAccountRequst) - returns (ImportAccountResponseEnvelope) { - option (google.api.http) = { - post : "/accounts/import", - body : "*" - }; - } - - rpc ExpirePassword(ExpirePasswordRequest) returns (google.protobuf.Empty) { + rpc ExpirePassword(ExpirePasswordRequest) returns (ExpirePasswordResponse) { option (google.api.http) = { put : "/accounts/{id}/expire_password" + additional_bindings: { + patch: "/accounts/{id}/expire_password" + } }; } +} - rpc ServiceStats(google.protobuf.Empty) returns (ServiceStatsResponse) { +// Secured. Only registered if Redis is available. +service AuthNActives { + rpc ServiceStats(ServiceStatsRequest) returns (ServiceStatsResponse) { option (google.api.http) = { get : "/stats" }; diff --git a/grpc/authn.pb.go b/grpc/authn.pb.go index a1d609ca68..9e2e046a85 100644 --- a/grpc/authn.pb.go +++ b/grpc/authn.pb.go @@ -8,7 +8,6 @@ import fmt "fmt" import math "math" import _ "github.com/gogo/googleapis/google/api" import _ "github.com/gogo/protobuf/gogoproto" -import types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" @@ -41,7 +40,7 @@ type SignupRequest struct { func (m *SignupRequest) Reset() { *m = SignupRequest{} } func (*SignupRequest) ProtoMessage() {} func (*SignupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{0} + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{0} } func (m *SignupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +92,7 @@ type SignupResponse struct { func (m *SignupResponse) Reset() { *m = SignupResponse{} } func (*SignupResponse) ProtoMessage() {} func (*SignupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{1} + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{1} } func (m *SignupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -138,7 +137,7 @@ type SignupResponseEnvelope struct { func (m *SignupResponseEnvelope) Reset() { *m = SignupResponseEnvelope{} } func (*SignupResponseEnvelope) ProtoMessage() {} func (*SignupResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{2} + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{2} } func (m *SignupResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,7 +182,7 @@ type IsUsernameAvailableRequest struct { func (m *IsUsernameAvailableRequest) Reset() { *m = IsUsernameAvailableRequest{} } func (*IsUsernameAvailableRequest) ProtoMessage() {} func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{3} + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{3} } func (m *IsUsernameAvailableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -228,7 +227,7 @@ type IsUsernameAvailableResponseEnvelope struct { func (m *IsUsernameAvailableResponseEnvelope) Reset() { *m = IsUsernameAvailableResponseEnvelope{} } func (*IsUsernameAvailableResponseEnvelope) ProtoMessage() {} func (*IsUsernameAvailableResponseEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{4} + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{4} } func (m *IsUsernameAvailableResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -264,24 +263,23 @@ func (m *IsUsernameAvailableResponseEnvelope) GetResult() bool { return false } -type LoginRequest struct { +type PasswordResetRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *LoginRequest) Reset() { *m = LoginRequest{} } -func (*LoginRequest) ProtoMessage() {} -func (*LoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{5} +func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } +func (*PasswordResetRequest) ProtoMessage() {} +func (*PasswordResetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{5} } -func (m *LoginRequest) XXX_Unmarshal(b []byte) error { +func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_PasswordResetRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -291,32 +289,62 @@ func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *LoginRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoginRequest.Merge(dst, src) +func (dst *PasswordResetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordResetRequest.Merge(dst, src) } -func (m *LoginRequest) XXX_Size() int { +func (m *PasswordResetRequest) XXX_Size() int { return m.Size() } -func (m *LoginRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LoginRequest.DiscardUnknown(m) +func (m *PasswordResetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordResetRequest.DiscardUnknown(m) } -var xxx_messageInfo_LoginRequest proto.InternalMessageInfo +var xxx_messageInfo_PasswordResetRequest proto.InternalMessageInfo -func (m *LoginRequest) GetUsername() string { +func (m *PasswordResetRequest) GetUsername() string { if m != nil { return m.Username } return "" } -func (m *LoginRequest) GetPassword() string { - if m != nil { - return m.Password +type PasswordResetResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PasswordResetResponse) Reset() { *m = PasswordResetResponse{} } +func (*PasswordResetResponse) ProtoMessage() {} +func (*PasswordResetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{6} +} +func (m *PasswordResetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PasswordResetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PasswordResetResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return "" +} +func (dst *PasswordResetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordResetResponse.Merge(dst, src) +} +func (m *PasswordResetResponse) XXX_Size() int { + return m.Size() +} +func (m *PasswordResetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordResetResponse.DiscardUnknown(m) } +var xxx_messageInfo_PasswordResetResponse proto.InternalMessageInfo + type RequestPasswordlessLoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -326,7 +354,7 @@ type RequestPasswordlessLoginRequest struct { func (m *RequestPasswordlessLoginRequest) Reset() { *m = RequestPasswordlessLoginRequest{} } func (*RequestPasswordlessLoginRequest) ProtoMessage() {} func (*RequestPasswordlessLoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{6} + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{7} } func (m *RequestPasswordlessLoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -362,6 +390,43 @@ func (m *RequestPasswordlessLoginRequest) GetUsername() string { return "" } +type RequestPasswordlessLoginResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestPasswordlessLoginResponse) Reset() { *m = RequestPasswordlessLoginResponse{} } +func (*RequestPasswordlessLoginResponse) ProtoMessage() {} +func (*RequestPasswordlessLoginResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{8} +} +func (m *RequestPasswordlessLoginResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestPasswordlessLoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestPasswordlessLoginResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RequestPasswordlessLoginResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestPasswordlessLoginResponse.Merge(dst, src) +} +func (m *RequestPasswordlessLoginResponse) XXX_Size() int { + return m.Size() +} +func (m *RequestPasswordlessLoginResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RequestPasswordlessLoginResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestPasswordlessLoginResponse proto.InternalMessageInfo + type SubmitPasswordlessLoginRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -371,7 +436,7 @@ type SubmitPasswordlessLoginRequest struct { func (m *SubmitPasswordlessLoginRequest) Reset() { *m = SubmitPasswordlessLoginRequest{} } func (*SubmitPasswordlessLoginRequest) ProtoMessage() {} func (*SubmitPasswordlessLoginRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{7} + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{9} } func (m *SubmitPasswordlessLoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -407,23 +472,23 @@ func (m *SubmitPasswordlessLoginRequest) GetToken() string { return "" } -type PasswordResetRequest struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` +type SubmitPasswordlessLoginResponse struct { + IdToken string `protobuf:"bytes,1,opt,name=id_token,json=idToken,proto3" json:"id_token"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PasswordResetRequest) Reset() { *m = PasswordResetRequest{} } -func (*PasswordResetRequest) ProtoMessage() {} -func (*PasswordResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{8} +func (m *SubmitPasswordlessLoginResponse) Reset() { *m = SubmitPasswordlessLoginResponse{} } +func (*SubmitPasswordlessLoginResponse) ProtoMessage() {} +func (*SubmitPasswordlessLoginResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{10} } -func (m *PasswordResetRequest) XXX_Unmarshal(b []byte) error { +func (m *SubmitPasswordlessLoginResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SubmitPasswordlessLoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PasswordResetRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_SubmitPasswordlessLoginResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -433,44 +498,44 @@ func (m *PasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (dst *PasswordResetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PasswordResetRequest.Merge(dst, src) +func (dst *SubmitPasswordlessLoginResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubmitPasswordlessLoginResponse.Merge(dst, src) } -func (m *PasswordResetRequest) XXX_Size() int { +func (m *SubmitPasswordlessLoginResponse) XXX_Size() int { return m.Size() } -func (m *PasswordResetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PasswordResetRequest.DiscardUnknown(m) +func (m *SubmitPasswordlessLoginResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SubmitPasswordlessLoginResponse.DiscardUnknown(m) } -var xxx_messageInfo_PasswordResetRequest proto.InternalMessageInfo +var xxx_messageInfo_SubmitPasswordlessLoginResponse proto.InternalMessageInfo -func (m *PasswordResetRequest) GetUsername() string { +func (m *SubmitPasswordlessLoginResponse) GetIdToken() string { if m != nil { - return m.Username + return m.IdToken } return "" } -type ChangePasswordRequest struct { - Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - CurrentPassword string `protobuf:"bytes,3,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type SubmitPasswordlessLoginResponseEnvelope struct { + Result *SubmitPasswordlessLoginResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } -func (*ChangePasswordRequest) ProtoMessage() {} -func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{9} +func (m *SubmitPasswordlessLoginResponseEnvelope) Reset() { + *m = SubmitPasswordlessLoginResponseEnvelope{} } -func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { +func (*SubmitPasswordlessLoginResponseEnvelope) ProtoMessage() {} +func (*SubmitPasswordlessLoginResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{11} +} +func (m *SubmitPasswordlessLoginResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SubmitPasswordlessLoginResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_SubmitPasswordlessLoginResponseEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -480,57 +545,43 @@ func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (dst *ChangePasswordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangePasswordRequest.Merge(dst, src) +func (dst *SubmitPasswordlessLoginResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubmitPasswordlessLoginResponseEnvelope.Merge(dst, src) } -func (m *ChangePasswordRequest) XXX_Size() int { +func (m *SubmitPasswordlessLoginResponseEnvelope) XXX_Size() int { return m.Size() } -func (m *ChangePasswordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo - -func (m *ChangePasswordRequest) GetPassword() string { - if m != nil { - return m.Password - } - return "" +func (m *SubmitPasswordlessLoginResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_SubmitPasswordlessLoginResponseEnvelope.DiscardUnknown(m) } -func (m *ChangePasswordRequest) GetToken() string { - if m != nil { - return m.Token - } - return "" -} +var xxx_messageInfo_SubmitPasswordlessLoginResponseEnvelope proto.InternalMessageInfo -func (m *ChangePasswordRequest) GetCurrentPassword() string { +func (m *SubmitPasswordlessLoginResponseEnvelope) GetResult() *SubmitPasswordlessLoginResponse { if m != nil { - return m.CurrentPassword + return m.Result } - return "" + return nil } -type BeginOAuthRequest struct { - ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` - RedirectURI string `protobuf:"bytes,2,opt,name=redirectURI,proto3" json:"redirectURI,omitempty"` +type LoginRequest struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *BeginOAuthRequest) Reset() { *m = BeginOAuthRequest{} } -func (*BeginOAuthRequest) ProtoMessage() {} -func (*BeginOAuthRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{10} +func (m *LoginRequest) Reset() { *m = LoginRequest{} } +func (*LoginRequest) ProtoMessage() {} +func (*LoginRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{12} } -func (m *BeginOAuthRequest) XXX_Unmarshal(b []byte) error { +func (m *LoginRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *BeginOAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_BeginOAuthRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -540,49 +591,49 @@ func (m *BeginOAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (dst *BeginOAuthRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeginOAuthRequest.Merge(dst, src) +func (dst *LoginRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoginRequest.Merge(dst, src) } -func (m *BeginOAuthRequest) XXX_Size() int { +func (m *LoginRequest) XXX_Size() int { return m.Size() } -func (m *BeginOAuthRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BeginOAuthRequest.DiscardUnknown(m) +func (m *LoginRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LoginRequest.DiscardUnknown(m) } -var xxx_messageInfo_BeginOAuthRequest proto.InternalMessageInfo +var xxx_messageInfo_LoginRequest proto.InternalMessageInfo -func (m *BeginOAuthRequest) GetProviderName() string { +func (m *LoginRequest) GetUsername() string { if m != nil { - return m.ProviderName + return m.Username } return "" } -func (m *BeginOAuthRequest) GetRedirectURI() string { +func (m *LoginRequest) GetPassword() string { if m != nil { - return m.RedirectURI + return m.Password } return "" } -type BeginOAuthResponse struct { - Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` +type LoginResponse struct { + IdToken string `protobuf:"bytes,1,opt,name=id_token,json=idToken,proto3" json:"id_token"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *BeginOAuthResponse) Reset() { *m = BeginOAuthResponse{} } -func (*BeginOAuthResponse) ProtoMessage() {} -func (*BeginOAuthResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{11} +func (m *LoginResponse) Reset() { *m = LoginResponse{} } +func (*LoginResponse) ProtoMessage() {} +func (*LoginResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{13} } -func (m *BeginOAuthResponse) XXX_Unmarshal(b []byte) error { +func (m *LoginResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *BeginOAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_BeginOAuthResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_LoginResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -592,42 +643,42 @@ func (m *BeginOAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *BeginOAuthResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeginOAuthResponse.Merge(dst, src) +func (dst *LoginResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoginResponse.Merge(dst, src) } -func (m *BeginOAuthResponse) XXX_Size() int { +func (m *LoginResponse) XXX_Size() int { return m.Size() } -func (m *BeginOAuthResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BeginOAuthResponse.DiscardUnknown(m) +func (m *LoginResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LoginResponse.DiscardUnknown(m) } -var xxx_messageInfo_BeginOAuthResponse proto.InternalMessageInfo +var xxx_messageInfo_LoginResponse proto.InternalMessageInfo -func (m *BeginOAuthResponse) GetProvider() string { +func (m *LoginResponse) GetIdToken() string { if m != nil { - return m.Provider + return m.IdToken } return "" } -type OAuthReturnRequest struct { - ProviderName string `protobuf:"bytes,1,opt,name=providerName,proto3" json:"providerName,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type LoginResponseEnvelope struct { + Result *LoginResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *OAuthReturnRequest) Reset() { *m = OAuthReturnRequest{} } -func (*OAuthReturnRequest) ProtoMessage() {} -func (*OAuthReturnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{12} +func (m *LoginResponseEnvelope) Reset() { *m = LoginResponseEnvelope{} } +func (*LoginResponseEnvelope) ProtoMessage() {} +func (*LoginResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{14} } -func (m *OAuthReturnRequest) XXX_Unmarshal(b []byte) error { +func (m *LoginResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *OAuthReturnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LoginResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_OAuthReturnRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_LoginResponseEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -637,42 +688,41 @@ func (m *OAuthReturnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *OAuthReturnRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OAuthReturnRequest.Merge(dst, src) +func (dst *LoginResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoginResponseEnvelope.Merge(dst, src) } -func (m *OAuthReturnRequest) XXX_Size() int { +func (m *LoginResponseEnvelope) XXX_Size() int { return m.Size() } -func (m *OAuthReturnRequest) XXX_DiscardUnknown() { - xxx_messageInfo_OAuthReturnRequest.DiscardUnknown(m) +func (m *LoginResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_LoginResponseEnvelope.DiscardUnknown(m) } -var xxx_messageInfo_OAuthReturnRequest proto.InternalMessageInfo +var xxx_messageInfo_LoginResponseEnvelope proto.InternalMessageInfo -func (m *OAuthReturnRequest) GetProviderName() string { +func (m *LoginResponseEnvelope) GetResult() *LoginResponse { if m != nil { - return m.ProviderName + return m.Result } - return "" + return nil } -type OAuthReturnResponse struct { - Redirect string `protobuf:"bytes,1,opt,name=redirect,proto3" json:"redirect,omitempty"` +type LogoutRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *OAuthReturnResponse) Reset() { *m = OAuthReturnResponse{} } -func (*OAuthReturnResponse) ProtoMessage() {} -func (*OAuthReturnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{13} +func (m *LogoutRequest) Reset() { *m = LogoutRequest{} } +func (*LogoutRequest) ProtoMessage() {} +func (*LogoutRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{15} } -func (m *OAuthReturnResponse) XXX_Unmarshal(b []byte) error { +func (m *LogoutRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *OAuthReturnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LogoutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_OAuthReturnResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_LogoutRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -682,47 +732,34 @@ func (m *OAuthReturnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *OAuthReturnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OAuthReturnResponse.Merge(dst, src) +func (dst *LogoutRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogoutRequest.Merge(dst, src) } -func (m *OAuthReturnResponse) XXX_Size() int { +func (m *LogoutRequest) XXX_Size() int { return m.Size() } -func (m *OAuthReturnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_OAuthReturnResponse.DiscardUnknown(m) +func (m *LogoutRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LogoutRequest.DiscardUnknown(m) } -var xxx_messageInfo_OAuthReturnResponse proto.InternalMessageInfo - -func (m *OAuthReturnResponse) GetRedirect() string { - if m != nil { - return m.Redirect - } - return "" -} +var xxx_messageInfo_LogoutRequest proto.InternalMessageInfo -type Configuration struct { - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - ResponseTypesSupported []string `protobuf:"bytes,2,rep,name=response_types_supported,json=responseTypesSupported" json:"response_types_supported,omitempty"` - SubjectTypesSupported []string `protobuf:"bytes,3,rep,name=subject_types_supported,json=subjectTypesSupported" json:"subject_types_supported,omitempty"` - IdTokenSigningAlgValuesSupported []string `protobuf:"bytes,4,rep,name=id_token_signing_alg_values_supported,json=idTokenSigningAlgValuesSupported" json:"id_token_signing_alg_values_supported,omitempty"` - ClaimsSupported []string `protobuf:"bytes,5,rep,name=claims_supported,json=claimsSupported" json:"claims_supported,omitempty"` - JwksUri string `protobuf:"bytes,6,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type LogoutResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Configuration) Reset() { *m = Configuration{} } -func (*Configuration) ProtoMessage() {} -func (*Configuration) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{14} +func (m *LogoutResponse) Reset() { *m = LogoutResponse{} } +func (*LogoutResponse) ProtoMessage() {} +func (*LogoutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{16} } -func (m *Configuration) XXX_Unmarshal(b []byte) error { +func (m *LogoutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LogoutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Configuration.Marshal(b, m, deterministic) + return xxx_messageInfo_LogoutResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -732,79 +769,72 @@ func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (dst *Configuration) XXX_Merge(src proto.Message) { - xxx_messageInfo_Configuration.Merge(dst, src) +func (dst *LogoutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogoutResponse.Merge(dst, src) } -func (m *Configuration) XXX_Size() int { +func (m *LogoutResponse) XXX_Size() int { return m.Size() } -func (m *Configuration) XXX_DiscardUnknown() { - xxx_messageInfo_Configuration.DiscardUnknown(m) +func (m *LogoutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LogoutResponse.DiscardUnknown(m) } -var xxx_messageInfo_Configuration proto.InternalMessageInfo +var xxx_messageInfo_LogoutResponse proto.InternalMessageInfo -func (m *Configuration) GetIssuer() string { - if m != nil { - return m.Issuer - } - return "" +type RefreshSessionRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Configuration) GetResponseTypesSupported() []string { - if m != nil { - return m.ResponseTypesSupported - } - return nil +func (m *RefreshSessionRequest) Reset() { *m = RefreshSessionRequest{} } +func (*RefreshSessionRequest) ProtoMessage() {} +func (*RefreshSessionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{17} } - -func (m *Configuration) GetSubjectTypesSupported() []string { - if m != nil { - return m.SubjectTypesSupported - } - return nil +func (m *RefreshSessionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (m *Configuration) GetIdTokenSigningAlgValuesSupported() []string { - if m != nil { - return m.IdTokenSigningAlgValuesSupported +func (m *RefreshSessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RefreshSessionRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return nil } - -func (m *Configuration) GetClaimsSupported() []string { - if m != nil { - return m.ClaimsSupported - } - return nil +func (dst *RefreshSessionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RefreshSessionRequest.Merge(dst, src) } - -func (m *Configuration) GetJwksUri() string { - if m != nil { - return m.JwksUri - } - return "" +func (m *RefreshSessionRequest) XXX_Size() int { + return m.Size() +} +func (m *RefreshSessionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RefreshSessionRequest.DiscardUnknown(m) } -type HealthCheckResponse struct { - Http bool `protobuf:"varint,1,opt,name=http,proto3" json:"http,omitempty"` - Db bool `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"` - Redis bool `protobuf:"varint,3,opt,name=redis,proto3" json:"redis,omitempty"` +var xxx_messageInfo_RefreshSessionRequest proto.InternalMessageInfo + +type RefreshSessionResponse struct { + IdToken string `protobuf:"bytes,1,opt,name=id_token,json=idToken,proto3" json:"id_token"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } -func (*HealthCheckResponse) ProtoMessage() {} -func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{15} +func (m *RefreshSessionResponse) Reset() { *m = RefreshSessionResponse{} } +func (*RefreshSessionResponse) ProtoMessage() {} +func (*RefreshSessionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{18} } -func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { +func (m *RefreshSessionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RefreshSessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_RefreshSessionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -814,61 +844,42 @@ func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HealthCheckResponse.Merge(dst, src) +func (dst *RefreshSessionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RefreshSessionResponse.Merge(dst, src) } -func (m *HealthCheckResponse) XXX_Size() int { +func (m *RefreshSessionResponse) XXX_Size() int { return m.Size() } -func (m *HealthCheckResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo - -func (m *HealthCheckResponse) GetHttp() bool { - if m != nil { - return m.Http - } - return false +func (m *RefreshSessionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RefreshSessionResponse.DiscardUnknown(m) } -func (m *HealthCheckResponse) GetDb() bool { - if m != nil { - return m.Db - } - return false -} +var xxx_messageInfo_RefreshSessionResponse proto.InternalMessageInfo -func (m *HealthCheckResponse) GetRedis() bool { +func (m *RefreshSessionResponse) GetIdToken() string { if m != nil { - return m.Redis + return m.IdToken } - return false + return "" } -type Key struct { - Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"` - Alg string `protobuf:"bytes,2,opt,name=alg,proto3" json:"alg,omitempty"` - Kty string `protobuf:"bytes,3,opt,name=kty,proto3" json:"kty,omitempty"` - Kid string `protobuf:"bytes,4,opt,name=kid,proto3" json:"kid,omitempty"` - E string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"` - N string `protobuf:"bytes,6,opt,name=n,proto3" json:"n,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type RefreshSessionResponseEnvelope struct { + Result *RefreshSessionResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Key) Reset() { *m = Key{} } -func (*Key) ProtoMessage() {} -func (*Key) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{16} +func (m *RefreshSessionResponseEnvelope) Reset() { *m = RefreshSessionResponseEnvelope{} } +func (*RefreshSessionResponseEnvelope) ProtoMessage() {} +func (*RefreshSessionResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{19} } -func (m *Key) XXX_Unmarshal(b []byte) error { +func (m *RefreshSessionResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RefreshSessionResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Key.Marshal(b, m, deterministic) + return xxx_messageInfo_RefreshSessionResponseEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -878,77 +889,148 @@ func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (dst *Key) XXX_Merge(src proto.Message) { - xxx_messageInfo_Key.Merge(dst, src) +func (dst *RefreshSessionResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_RefreshSessionResponseEnvelope.Merge(dst, src) } -func (m *Key) XXX_Size() int { +func (m *RefreshSessionResponseEnvelope) XXX_Size() int { return m.Size() } -func (m *Key) XXX_DiscardUnknown() { - xxx_messageInfo_Key.DiscardUnknown(m) +func (m *RefreshSessionResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_RefreshSessionResponseEnvelope.DiscardUnknown(m) } -var xxx_messageInfo_Key proto.InternalMessageInfo +var xxx_messageInfo_RefreshSessionResponseEnvelope proto.InternalMessageInfo -func (m *Key) GetUse() string { +func (m *RefreshSessionResponseEnvelope) GetResult() *RefreshSessionResponse { if m != nil { - return m.Use + return m.Result } - return "" + return nil } -func (m *Key) GetAlg() string { - if m != nil { - return m.Alg - } - return "" +type ChangePasswordRequest struct { + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + CurrentPassword string `protobuf:"bytes,3,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Key) GetKty() string { - if m != nil { - return m.Kty - } - return "" +func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } +func (*ChangePasswordRequest) ProtoMessage() {} +func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{20} +} +func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ChangePasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangePasswordRequest.Merge(dst, src) +} +func (m *ChangePasswordRequest) XXX_Size() int { + return m.Size() +} +func (m *ChangePasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m) } -func (m *Key) GetKid() string { +var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo + +func (m *ChangePasswordRequest) GetPassword() string { if m != nil { - return m.Kid + return m.Password } return "" } -func (m *Key) GetE() string { +func (m *ChangePasswordRequest) GetToken() string { if m != nil { - return m.E + return m.Token } return "" } -func (m *Key) GetN() string { +func (m *ChangePasswordRequest) GetCurrentPassword() string { if m != nil { - return m.N + return m.CurrentPassword } return "" } -type JWKSResponse struct { - Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` +type ChangePasswordResponse struct { + IdToken string `protobuf:"bytes,1,opt,name=id_token,json=idToken,proto3" json:"id_token"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *JWKSResponse) Reset() { *m = JWKSResponse{} } -func (*JWKSResponse) ProtoMessage() {} -func (*JWKSResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_authn_75e9d4eb00e36a41, []int{17} +func (m *ChangePasswordResponse) Reset() { *m = ChangePasswordResponse{} } +func (*ChangePasswordResponse) ProtoMessage() {} +func (*ChangePasswordResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{21} +} +func (m *ChangePasswordResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChangePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChangePasswordResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ChangePasswordResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangePasswordResponse.Merge(dst, src) +} +func (m *ChangePasswordResponse) XXX_Size() int { + return m.Size() +} +func (m *ChangePasswordResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ChangePasswordResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangePasswordResponse proto.InternalMessageInfo + +func (m *ChangePasswordResponse) GetIdToken() string { + if m != nil { + return m.IdToken + } + return "" +} + +type ChangePasswordResponseEnvelope struct { + Result *ChangePasswordResponse `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ChangePasswordResponseEnvelope) Reset() { *m = ChangePasswordResponseEnvelope{} } +func (*ChangePasswordResponseEnvelope) ProtoMessage() {} +func (*ChangePasswordResponseEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{22} } -func (m *JWKSResponse) XXX_Unmarshal(b []byte) error { +func (m *ChangePasswordResponseEnvelope) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *JWKSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ChangePasswordResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_JWKSResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_ChangePasswordResponseEnvelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -958,44 +1040,149 @@ func (m *JWKSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (dst *JWKSResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JWKSResponse.Merge(dst, src) +func (dst *ChangePasswordResponseEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangePasswordResponseEnvelope.Merge(dst, src) } -func (m *JWKSResponse) XXX_Size() int { +func (m *ChangePasswordResponseEnvelope) XXX_Size() int { return m.Size() } -func (m *JWKSResponse) XXX_DiscardUnknown() { - xxx_messageInfo_JWKSResponse.DiscardUnknown(m) +func (m *ChangePasswordResponseEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_ChangePasswordResponseEnvelope.DiscardUnknown(m) } -var xxx_messageInfo_JWKSResponse proto.InternalMessageInfo +var xxx_messageInfo_ChangePasswordResponseEnvelope proto.InternalMessageInfo -func (m *JWKSResponse) GetKeys() []*Key { +func (m *ChangePasswordResponseEnvelope) GetResult() *ChangePasswordResponse { if m != nil { - return m.Keys + return m.Result } return nil } +type HealthCheckRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} } +func (*HealthCheckRequest) ProtoMessage() {} +func (*HealthCheckRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{23} +} +func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HealthCheckRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *HealthCheckRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckRequest.Merge(dst, src) +} +func (m *HealthCheckRequest) XXX_Size() int { + return m.Size() +} +func (m *HealthCheckRequest) XXX_DiscardUnknown() { + xxx_messageInfo_HealthCheckRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_HealthCheckRequest proto.InternalMessageInfo + +type HealthCheckResponse struct { + Http bool `protobuf:"varint,1,opt,name=http,proto3" json:"http,omitempty"` + Db bool `protobuf:"varint,2,opt,name=db,proto3" json:"db,omitempty"` + Redis bool `protobuf:"varint,3,opt,name=redis,proto3" json:"redis,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } +func (*HealthCheckResponse) ProtoMessage() {} +func (*HealthCheckResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_authn_56f86b1d6e0d04dd, []int{24} +} +func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckResponse.Merge(dst, src) +} +func (m *HealthCheckResponse) XXX_Size() int { + return m.Size() +} +func (m *HealthCheckResponse) XXX_DiscardUnknown() { + xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo + +func (m *HealthCheckResponse) GetHttp() bool { + if m != nil { + return m.Http + } + return false +} + +func (m *HealthCheckResponse) GetDb() bool { + if m != nil { + return m.Db + } + return false +} + +func (m *HealthCheckResponse) GetRedis() bool { + if m != nil { + return m.Redis + } + return false +} + func init() { - proto.RegisterType((*SignupRequest)(nil), "grpc.SignupRequest") - proto.RegisterType((*SignupResponse)(nil), "grpc.SignupResponse") - proto.RegisterType((*SignupResponseEnvelope)(nil), "grpc.SignupResponseEnvelope") - proto.RegisterType((*IsUsernameAvailableRequest)(nil), "grpc.IsUsernameAvailableRequest") - proto.RegisterType((*IsUsernameAvailableResponseEnvelope)(nil), "grpc.IsUsernameAvailableResponseEnvelope") - proto.RegisterType((*LoginRequest)(nil), "grpc.LoginRequest") - proto.RegisterType((*RequestPasswordlessLoginRequest)(nil), "grpc.RequestPasswordlessLoginRequest") - proto.RegisterType((*SubmitPasswordlessLoginRequest)(nil), "grpc.SubmitPasswordlessLoginRequest") - proto.RegisterType((*PasswordResetRequest)(nil), "grpc.PasswordResetRequest") - proto.RegisterType((*ChangePasswordRequest)(nil), "grpc.ChangePasswordRequest") - proto.RegisterType((*BeginOAuthRequest)(nil), "grpc.BeginOAuthRequest") - proto.RegisterType((*BeginOAuthResponse)(nil), "grpc.BeginOAuthResponse") - proto.RegisterType((*OAuthReturnRequest)(nil), "grpc.OAuthReturnRequest") - proto.RegisterType((*OAuthReturnResponse)(nil), "grpc.OAuthReturnResponse") - proto.RegisterType((*Configuration)(nil), "grpc.Configuration") - proto.RegisterType((*HealthCheckResponse)(nil), "grpc.HealthCheckResponse") - proto.RegisterType((*Key)(nil), "grpc.Key") - proto.RegisterType((*JWKSResponse)(nil), "grpc.JWKSResponse") + proto.RegisterType((*SignupRequest)(nil), "keratin.authn.SignupRequest") + proto.RegisterType((*SignupResponse)(nil), "keratin.authn.SignupResponse") + proto.RegisterType((*SignupResponseEnvelope)(nil), "keratin.authn.SignupResponseEnvelope") + proto.RegisterType((*IsUsernameAvailableRequest)(nil), "keratin.authn.IsUsernameAvailableRequest") + proto.RegisterType((*IsUsernameAvailableResponseEnvelope)(nil), "keratin.authn.IsUsernameAvailableResponseEnvelope") + proto.RegisterType((*PasswordResetRequest)(nil), "keratin.authn.PasswordResetRequest") + proto.RegisterType((*PasswordResetResponse)(nil), "keratin.authn.PasswordResetResponse") + proto.RegisterType((*RequestPasswordlessLoginRequest)(nil), "keratin.authn.RequestPasswordlessLoginRequest") + proto.RegisterType((*RequestPasswordlessLoginResponse)(nil), "keratin.authn.RequestPasswordlessLoginResponse") + proto.RegisterType((*SubmitPasswordlessLoginRequest)(nil), "keratin.authn.SubmitPasswordlessLoginRequest") + proto.RegisterType((*SubmitPasswordlessLoginResponse)(nil), "keratin.authn.SubmitPasswordlessLoginResponse") + proto.RegisterType((*SubmitPasswordlessLoginResponseEnvelope)(nil), "keratin.authn.SubmitPasswordlessLoginResponseEnvelope") + proto.RegisterType((*LoginRequest)(nil), "keratin.authn.LoginRequest") + proto.RegisterType((*LoginResponse)(nil), "keratin.authn.LoginResponse") + proto.RegisterType((*LoginResponseEnvelope)(nil), "keratin.authn.LoginResponseEnvelope") + proto.RegisterType((*LogoutRequest)(nil), "keratin.authn.LogoutRequest") + proto.RegisterType((*LogoutResponse)(nil), "keratin.authn.LogoutResponse") + proto.RegisterType((*RefreshSessionRequest)(nil), "keratin.authn.RefreshSessionRequest") + proto.RegisterType((*RefreshSessionResponse)(nil), "keratin.authn.RefreshSessionResponse") + proto.RegisterType((*RefreshSessionResponseEnvelope)(nil), "keratin.authn.RefreshSessionResponseEnvelope") + proto.RegisterType((*ChangePasswordRequest)(nil), "keratin.authn.ChangePasswordRequest") + proto.RegisterType((*ChangePasswordResponse)(nil), "keratin.authn.ChangePasswordResponse") + proto.RegisterType((*ChangePasswordResponseEnvelope)(nil), "keratin.authn.ChangePasswordResponseEnvelope") + proto.RegisterType((*HealthCheckRequest)(nil), "keratin.authn.HealthCheckRequest") + proto.RegisterType((*HealthCheckResponse)(nil), "keratin.authn.HealthCheckResponse") } func (this *SignupRequest) Equal(that interface{}) bool { if that == nil { @@ -1120,14 +1307,14 @@ func (this *IsUsernameAvailableResponseEnvelope) Equal(that interface{}) bool { } return true } -func (this *LoginRequest) Equal(that interface{}) bool { +func (this *PasswordResetRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*LoginRequest) + that1, ok := that.(*PasswordResetRequest) if !ok { - that2, ok := that.(LoginRequest) + that2, ok := that.(PasswordResetRequest) if ok { that1 = &that2 } else { @@ -1142,19 +1329,16 @@ func (this *LoginRequest) Equal(that interface{}) bool { if this.Username != that1.Username { return false } - if this.Password != that1.Password { - return false - } return true } -func (this *RequestPasswordlessLoginRequest) Equal(that interface{}) bool { +func (this *PasswordResetResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*RequestPasswordlessLoginRequest) + that1, ok := that.(*PasswordResetResponse) if !ok { - that2, ok := that.(RequestPasswordlessLoginRequest) + that2, ok := that.(PasswordResetResponse) if ok { that1 = &that2 } else { @@ -1166,19 +1350,16 @@ func (this *RequestPasswordlessLoginRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Username != that1.Username { - return false - } return true } -func (this *SubmitPasswordlessLoginRequest) Equal(that interface{}) bool { +func (this *RequestPasswordlessLoginRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SubmitPasswordlessLoginRequest) + that1, ok := that.(*RequestPasswordlessLoginRequest) if !ok { - that2, ok := that.(SubmitPasswordlessLoginRequest) + that2, ok := that.(RequestPasswordlessLoginRequest) if ok { that1 = &that2 } else { @@ -1190,19 +1371,19 @@ func (this *SubmitPasswordlessLoginRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Token != that1.Token { + if this.Username != that1.Username { return false } return true } -func (this *PasswordResetRequest) Equal(that interface{}) bool { +func (this *RequestPasswordlessLoginResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*PasswordResetRequest) + that1, ok := that.(*RequestPasswordlessLoginResponse) if !ok { - that2, ok := that.(PasswordResetRequest) + that2, ok := that.(RequestPasswordlessLoginResponse) if ok { that1 = &that2 } else { @@ -1214,19 +1395,16 @@ func (this *PasswordResetRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Username != that1.Username { - return false - } return true } -func (this *ChangePasswordRequest) Equal(that interface{}) bool { +func (this *SubmitPasswordlessLoginRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*ChangePasswordRequest) + that1, ok := that.(*SubmitPasswordlessLoginRequest) if !ok { - that2, ok := that.(ChangePasswordRequest) + that2, ok := that.(SubmitPasswordlessLoginRequest) if ok { that1 = &that2 } else { @@ -1238,25 +1416,19 @@ func (this *ChangePasswordRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Password != that1.Password { - return false - } if this.Token != that1.Token { return false } - if this.CurrentPassword != that1.CurrentPassword { - return false - } return true } -func (this *BeginOAuthRequest) Equal(that interface{}) bool { +func (this *SubmitPasswordlessLoginResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*BeginOAuthRequest) + that1, ok := that.(*SubmitPasswordlessLoginResponse) if !ok { - that2, ok := that.(BeginOAuthRequest) + that2, ok := that.(SubmitPasswordlessLoginResponse) if ok { that1 = &that2 } else { @@ -1268,22 +1440,19 @@ func (this *BeginOAuthRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.ProviderName != that1.ProviderName { - return false - } - if this.RedirectURI != that1.RedirectURI { + if this.IdToken != that1.IdToken { return false } return true } -func (this *BeginOAuthResponse) Equal(that interface{}) bool { +func (this *SubmitPasswordlessLoginResponseEnvelope) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*BeginOAuthResponse) + that1, ok := that.(*SubmitPasswordlessLoginResponseEnvelope) if !ok { - that2, ok := that.(BeginOAuthResponse) + that2, ok := that.(SubmitPasswordlessLoginResponseEnvelope) if ok { that1 = &that2 } else { @@ -1295,19 +1464,19 @@ func (this *BeginOAuthResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Provider != that1.Provider { + if !this.Result.Equal(that1.Result) { return false } return true } -func (this *OAuthReturnRequest) Equal(that interface{}) bool { +func (this *LoginRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*OAuthReturnRequest) + that1, ok := that.(*LoginRequest) if !ok { - that2, ok := that.(OAuthReturnRequest) + that2, ok := that.(LoginRequest) if ok { that1 = &that2 } else { @@ -1319,19 +1488,22 @@ func (this *OAuthReturnRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.ProviderName != that1.ProviderName { + if this.Username != that1.Username { + return false + } + if this.Password != that1.Password { return false } return true } -func (this *OAuthReturnResponse) Equal(that interface{}) bool { +func (this *LoginResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*OAuthReturnResponse) + that1, ok := that.(*LoginResponse) if !ok { - that2, ok := that.(OAuthReturnResponse) + that2, ok := that.(LoginResponse) if ok { that1 = &that2 } else { @@ -1343,19 +1515,19 @@ func (this *OAuthReturnResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Redirect != that1.Redirect { + if this.IdToken != that1.IdToken { return false } return true } -func (this *Configuration) Equal(that interface{}) bool { +func (this *LoginResponseEnvelope) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Configuration) + that1, ok := that.(*LoginResponseEnvelope) if !ok { - that2, ok := that.(Configuration) + that2, ok := that.(LoginResponseEnvelope) if ok { that1 = &that2 } else { @@ -1367,54 +1539,61 @@ func (this *Configuration) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Issuer != that1.Issuer { - return false - } - if len(this.ResponseTypesSupported) != len(that1.ResponseTypesSupported) { + if !this.Result.Equal(that1.Result) { return false } - for i := range this.ResponseTypesSupported { - if this.ResponseTypesSupported[i] != that1.ResponseTypesSupported[i] { - return false - } - } - if len(this.SubjectTypesSupported) != len(that1.SubjectTypesSupported) { - return false + return true +} +func (this *LogoutRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - for i := range this.SubjectTypesSupported { - if this.SubjectTypesSupported[i] != that1.SubjectTypesSupported[i] { + + that1, ok := that.(*LogoutRequest) + if !ok { + that2, ok := that.(LogoutRequest) + if ok { + that1 = &that2 + } else { return false } } - if len(this.IdTokenSigningAlgValuesSupported) != len(that1.IdTokenSigningAlgValuesSupported) { + if that1 == nil { + return this == nil + } else if this == nil { return false } - for i := range this.IdTokenSigningAlgValuesSupported { - if this.IdTokenSigningAlgValuesSupported[i] != that1.IdTokenSigningAlgValuesSupported[i] { - return false - } - } - if len(this.ClaimsSupported) != len(that1.ClaimsSupported) { - return false + return true +} +func (this *LogoutResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - for i := range this.ClaimsSupported { - if this.ClaimsSupported[i] != that1.ClaimsSupported[i] { + + that1, ok := that.(*LogoutResponse) + if !ok { + that2, ok := that.(LogoutResponse) + if ok { + that1 = &that2 + } else { return false } } - if this.JwksUri != that1.JwksUri { + if that1 == nil { + return this == nil + } else if this == nil { return false } return true } -func (this *HealthCheckResponse) Equal(that interface{}) bool { +func (this *RefreshSessionRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*HealthCheckResponse) + that1, ok := that.(*RefreshSessionRequest) if !ok { - that2, ok := that.(HealthCheckResponse) + that2, ok := that.(RefreshSessionRequest) if ok { that1 = &that2 } else { @@ -1426,25 +1605,16 @@ func (this *HealthCheckResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Http != that1.Http { - return false - } - if this.Db != that1.Db { - return false - } - if this.Redis != that1.Redis { - return false - } return true } -func (this *Key) Equal(that interface{}) bool { +func (this *RefreshSessionResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Key) + that1, ok := that.(*RefreshSessionResponse) if !ok { - that2, ok := that.(Key) + that2, ok := that.(RefreshSessionResponse) if ok { that1 = &that2 } else { @@ -1456,34 +1626,19 @@ func (this *Key) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Use != that1.Use { - return false - } - if this.Alg != that1.Alg { - return false - } - if this.Kty != that1.Kty { - return false - } - if this.Kid != that1.Kid { - return false - } - if this.E != that1.E { - return false - } - if this.N != that1.N { + if this.IdToken != that1.IdToken { return false } return true } -func (this *JWKSResponse) Equal(that interface{}) bool { +func (this *RefreshSessionResponseEnvelope) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*JWKSResponse) + that1, ok := that.(*RefreshSessionResponseEnvelope) if !ok { - that2, ok := that.(JWKSResponse) + that2, ok := that.(RefreshSessionResponseEnvelope) if ok { that1 = &that2 } else { @@ -1495,14 +1650,138 @@ func (this *JWKSResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if len(this.Keys) != len(that1.Keys) { + if !this.Result.Equal(that1.Result) { return false } - for i := range this.Keys { - if !this.Keys[i].Equal(that1.Keys[i]) { + return true +} +func (this *ChangePasswordRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ChangePasswordRequest) + if !ok { + that2, ok := that.(ChangePasswordRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Password != that1.Password { + return false + } + if this.Token != that1.Token { + return false + } + if this.CurrentPassword != that1.CurrentPassword { + return false + } + return true +} +func (this *ChangePasswordResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ChangePasswordResponse) + if !ok { + that2, ok := that.(ChangePasswordResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.IdToken != that1.IdToken { + return false + } + return true +} +func (this *ChangePasswordResponseEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ChangePasswordResponseEnvelope) + if !ok { + that2, ok := that.(ChangePasswordResponseEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Result.Equal(that1.Result) { + return false + } + return true +} +func (this *HealthCheckRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*HealthCheckRequest) + if !ok { + that2, ok := that.(HealthCheckRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *HealthCheckResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*HealthCheckResponse) + if !ok { + that2, ok := that.(HealthCheckResponse) + if ok { + that1 = &that2 + } else { return false } } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Http != that1.Http { + return false + } + if this.Db != that1.Db { + return false + } + if this.Redis != that1.Redis { + return false + } return true } func (this *SignupRequest) GoString() string { @@ -1558,14 +1837,22 @@ func (this *IsUsernameAvailableResponseEnvelope) GoString() string { s = append(s, "}") return strings.Join(s, "") } -func (this *LoginRequest) GoString() string { +func (this *PasswordResetRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) - s = append(s, "&grpc.LoginRequest{") + s := make([]string, 0, 5) + s = append(s, "&grpc.PasswordResetRequest{") s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *PasswordResetResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.PasswordResetResponse{") s = append(s, "}") return strings.Join(s, "") } @@ -1579,6 +1866,15 @@ func (this *RequestPasswordlessLoginRequest) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *RequestPasswordlessLoginResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.RequestPasswordlessLoginResponse{") + s = append(s, "}") + return strings.Join(s, "") +} func (this *SubmitPasswordlessLoginRequest) GoString() string { if this == nil { return "nil" @@ -1589,120 +1885,162 @@ func (this *SubmitPasswordlessLoginRequest) GoString() string { s = append(s, "}") return strings.Join(s, "") } -func (this *PasswordResetRequest) GoString() string { +func (this *SubmitPasswordlessLoginResponse) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 5) - s = append(s, "&grpc.PasswordResetRequest{") - s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "&grpc.SubmitPasswordlessLoginResponse{") + s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") s = append(s, "}") return strings.Join(s, "") } -func (this *ChangePasswordRequest) GoString() string { +func (this *SubmitPasswordlessLoginResponseEnvelope) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) - s = append(s, "&grpc.ChangePasswordRequest{") - s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") - s = append(s, "Token: "+fmt.Sprintf("%#v", this.Token)+",\n") - s = append(s, "CurrentPassword: "+fmt.Sprintf("%#v", this.CurrentPassword)+",\n") + s := make([]string, 0, 5) + s = append(s, "&grpc.SubmitPasswordlessLoginResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } s = append(s, "}") return strings.Join(s, "") } -func (this *BeginOAuthRequest) GoString() string { +func (this *LoginRequest) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 6) - s = append(s, "&grpc.BeginOAuthRequest{") - s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") - s = append(s, "RedirectURI: "+fmt.Sprintf("%#v", this.RedirectURI)+",\n") + s = append(s, "&grpc.LoginRequest{") + s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") s = append(s, "}") return strings.Join(s, "") } -func (this *BeginOAuthResponse) GoString() string { +func (this *LoginResponse) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 5) - s = append(s, "&grpc.BeginOAuthResponse{") - s = append(s, "Provider: "+fmt.Sprintf("%#v", this.Provider)+",\n") + s = append(s, "&grpc.LoginResponse{") + s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") s = append(s, "}") return strings.Join(s, "") } -func (this *OAuthReturnRequest) GoString() string { +func (this *LoginResponseEnvelope) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 5) - s = append(s, "&grpc.OAuthReturnRequest{") - s = append(s, "ProviderName: "+fmt.Sprintf("%#v", this.ProviderName)+",\n") + s = append(s, "&grpc.LoginResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LogoutRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.LogoutRequest{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LogoutResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.LogoutResponse{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RefreshSessionRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.RefreshSessionRequest{") s = append(s, "}") return strings.Join(s, "") } -func (this *OAuthReturnResponse) GoString() string { +func (this *RefreshSessionResponse) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 5) - s = append(s, "&grpc.OAuthReturnResponse{") - s = append(s, "Redirect: "+fmt.Sprintf("%#v", this.Redirect)+",\n") + s = append(s, "&grpc.RefreshSessionResponse{") + s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") s = append(s, "}") return strings.Join(s, "") } -func (this *Configuration) GoString() string { +func (this *RefreshSessionResponseEnvelope) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 10) - s = append(s, "&grpc.Configuration{") - s = append(s, "Issuer: "+fmt.Sprintf("%#v", this.Issuer)+",\n") - s = append(s, "ResponseTypesSupported: "+fmt.Sprintf("%#v", this.ResponseTypesSupported)+",\n") - s = append(s, "SubjectTypesSupported: "+fmt.Sprintf("%#v", this.SubjectTypesSupported)+",\n") - s = append(s, "IdTokenSigningAlgValuesSupported: "+fmt.Sprintf("%#v", this.IdTokenSigningAlgValuesSupported)+",\n") - s = append(s, "ClaimsSupported: "+fmt.Sprintf("%#v", this.ClaimsSupported)+",\n") - s = append(s, "JwksUri: "+fmt.Sprintf("%#v", this.JwksUri)+",\n") + s := make([]string, 0, 5) + s = append(s, "&grpc.RefreshSessionResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } s = append(s, "}") return strings.Join(s, "") } -func (this *HealthCheckResponse) GoString() string { +func (this *ChangePasswordRequest) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 7) - s = append(s, "&grpc.HealthCheckResponse{") - s = append(s, "Http: "+fmt.Sprintf("%#v", this.Http)+",\n") - s = append(s, "Db: "+fmt.Sprintf("%#v", this.Db)+",\n") - s = append(s, "Redis: "+fmt.Sprintf("%#v", this.Redis)+",\n") + s = append(s, "&grpc.ChangePasswordRequest{") + s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n") + s = append(s, "Token: "+fmt.Sprintf("%#v", this.Token)+",\n") + s = append(s, "CurrentPassword: "+fmt.Sprintf("%#v", this.CurrentPassword)+",\n") s = append(s, "}") return strings.Join(s, "") } -func (this *Key) GoString() string { +func (this *ChangePasswordResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 10) - s = append(s, "&grpc.Key{") - s = append(s, "Use: "+fmt.Sprintf("%#v", this.Use)+",\n") - s = append(s, "Alg: "+fmt.Sprintf("%#v", this.Alg)+",\n") - s = append(s, "Kty: "+fmt.Sprintf("%#v", this.Kty)+",\n") - s = append(s, "Kid: "+fmt.Sprintf("%#v", this.Kid)+",\n") - s = append(s, "E: "+fmt.Sprintf("%#v", this.E)+",\n") - s = append(s, "N: "+fmt.Sprintf("%#v", this.N)+",\n") + s := make([]string, 0, 5) + s = append(s, "&grpc.ChangePasswordResponse{") + s = append(s, "IdToken: "+fmt.Sprintf("%#v", this.IdToken)+",\n") s = append(s, "}") return strings.Join(s, "") } -func (this *JWKSResponse) GoString() string { +func (this *ChangePasswordResponseEnvelope) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 5) - s = append(s, "&grpc.JWKSResponse{") - if this.Keys != nil { - s = append(s, "Keys: "+fmt.Sprintf("%#v", this.Keys)+",\n") + s = append(s, "&grpc.ChangePasswordResponseEnvelope{") + if this.Result != nil { + s = append(s, "Result: "+fmt.Sprintf("%#v", this.Result)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *HealthCheckRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&grpc.HealthCheckRequest{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *HealthCheckResponse) GoString() string { + if this == nil { + return "nil" } + s := make([]string, 0, 7) + s = append(s, "&grpc.HealthCheckResponse{") + s = append(s, "Http: "+fmt.Sprintf("%#v", this.Http)+",\n") + s = append(s, "Db: "+fmt.Sprintf("%#v", this.Db)+",\n") + s = append(s, "Redis: "+fmt.Sprintf("%#v", this.Redis)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -1723,418 +2061,415 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// PublicAuthNClient is the client API for PublicAuthN service. +// SignupServiceClient is the client API for SignupService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PublicAuthNClient interface { +type SignupServiceClient interface { Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) - Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) - RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) - Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) - RequestPasswordlessLogin(ctx context.Context, in *RequestPasswordlessLoginRequest, opts ...grpc.CallOption) (*types.Empty, error) - SubmitPasswordlessLogin(ctx context.Context, in *SubmitPasswordlessLoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) - RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) - ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) - BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) - OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) - ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) - JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) - HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) } -type publicAuthNClient struct { +type signupServiceClient struct { cc *grpc.ClientConn } -func NewPublicAuthNClient(cc *grpc.ClientConn) PublicAuthNClient { - return &publicAuthNClient{cc} +func NewSignupServiceClient(cc *grpc.ClientConn) SignupServiceClient { + return &signupServiceClient{cc} } -func (c *publicAuthNClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { +func (c *signupServiceClient) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { out := new(SignupResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Signup", in, out, opts...) + err := c.cc.Invoke(ctx, "/keratin.authn.SignupService/Signup", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *publicAuthNClient) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) { +func (c *signupServiceClient) IsUsernameAvailable(ctx context.Context, in *IsUsernameAvailableRequest, opts ...grpc.CallOption) (*IsUsernameAvailableResponseEnvelope, error) { out := new(IsUsernameAvailableResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/IsUsernameAvailable", in, out, opts...) + err := c.cc.Invoke(ctx, "/keratin.authn.SignupService/IsUsernameAvailable", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *publicAuthNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { - out := new(SignupResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Login", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// SignupServiceServer is the server API for SignupService service. +type SignupServiceServer interface { + Signup(context.Context, *SignupRequest) (*SignupResponseEnvelope, error) + IsUsernameAvailable(context.Context, *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) } -func (c *publicAuthNClient) RefreshSession(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { - out := new(SignupResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RefreshSession", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func RegisterSignupServiceServer(s *grpc.Server, srv SignupServiceServer) { + s.RegisterService(&_SignupService_serviceDesc, srv) } -func (c *publicAuthNClient) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/Logout", in, out, opts...) - if err != nil { +func _SignupService_Signup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignupRequest) + if err := dec(in); err != nil { return nil, err } - return out, nil -} - -func (c *publicAuthNClient) RequestPasswordlessLogin(ctx context.Context, in *RequestPasswordlessLoginRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RequestPasswordlessLogin", in, out, opts...) - if err != nil { - return nil, err + if interceptor == nil { + return srv.(SignupServiceServer).Signup(ctx, in) } - return out, nil -} - -func (c *publicAuthNClient) SubmitPasswordlessLogin(ctx context.Context, in *SubmitPasswordlessLoginRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { - out := new(SignupResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/SubmitPasswordlessLogin", in, out, opts...) - if err != nil { - return nil, err + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keratin.authn.SignupService/Signup", } - return out, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SignupServiceServer).Signup(ctx, req.(*SignupRequest)) + } + return interceptor(ctx, in, info, handler) } -func (c *publicAuthNClient) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/RequestPasswordReset", in, out, opts...) - if err != nil { +func _SignupService_IsUsernameAvailable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsUsernameAvailableRequest) + if err := dec(in); err != nil { return nil, err } - return out, nil -} - -func (c *publicAuthNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*SignupResponseEnvelope, error) { - out := new(SignupResponseEnvelope) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/ChangePassword", in, out, opts...) - if err != nil { - return nil, err + if interceptor == nil { + return srv.(SignupServiceServer).IsUsernameAvailable(ctx, in) } - return out, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/keratin.authn.SignupService/IsUsernameAvailable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SignupServiceServer).IsUsernameAvailable(ctx, req.(*IsUsernameAvailableRequest)) + } + return interceptor(ctx, in, info, handler) } -func (c *publicAuthNClient) BeginOAuth(ctx context.Context, in *BeginOAuthRequest, opts ...grpc.CallOption) (*BeginOAuthResponse, error) { - out := new(BeginOAuthResponse) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/BeginOAuth", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +var _SignupService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "keratin.authn.SignupService", + HandlerType: (*SignupServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Signup", + Handler: _SignupService_Signup_Handler, + }, + { + MethodName: "IsUsernameAvailable", + Handler: _SignupService_IsUsernameAvailable_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn.proto", } -func (c *publicAuthNClient) OAuthReturn(ctx context.Context, in *OAuthReturnRequest, opts ...grpc.CallOption) (*OAuthReturnResponse, error) { - out := new(OAuthReturnResponse) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/OAuthReturn", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// PasswordResetServiceClient is the client API for PasswordResetService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PasswordResetServiceClient interface { + RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*PasswordResetResponse, error) } -func (c *publicAuthNClient) ServiceConfiguration(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*Configuration, error) { - out := new(Configuration) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/ServiceConfiguration", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type passwordResetServiceClient struct { + cc *grpc.ClientConn } -func (c *publicAuthNClient) JWKS(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*JWKSResponse, error) { - out := new(JWKSResponse) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/JWKS", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func NewPasswordResetServiceClient(cc *grpc.ClientConn) PasswordResetServiceClient { + return &passwordResetServiceClient{cc} } -func (c *publicAuthNClient) HealthCheck(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) { - out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, "/grpc.PublicAuthN/HealthCheck", in, out, opts...) +func (c *passwordResetServiceClient) RequestPasswordReset(ctx context.Context, in *PasswordResetRequest, opts ...grpc.CallOption) (*PasswordResetResponse, error) { + out := new(PasswordResetResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.PasswordResetService/RequestPasswordReset", in, out, opts...) if err != nil { return nil, err } return out, nil } -// PublicAuthNServer is the server API for PublicAuthN service. -type PublicAuthNServer interface { - Signup(context.Context, *SignupRequest) (*SignupResponseEnvelope, error) - IsUsernameAvailable(context.Context, *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) - Login(context.Context, *LoginRequest) (*SignupResponseEnvelope, error) - RefreshSession(context.Context, *types.Empty) (*SignupResponseEnvelope, error) - Logout(context.Context, *types.Empty) (*types.Empty, error) - RequestPasswordlessLogin(context.Context, *RequestPasswordlessLoginRequest) (*types.Empty, error) - SubmitPasswordlessLogin(context.Context, *SubmitPasswordlessLoginRequest) (*SignupResponseEnvelope, error) - RequestPasswordReset(context.Context, *PasswordResetRequest) (*types.Empty, error) - ChangePassword(context.Context, *ChangePasswordRequest) (*SignupResponseEnvelope, error) - BeginOAuth(context.Context, *BeginOAuthRequest) (*BeginOAuthResponse, error) - OAuthReturn(context.Context, *OAuthReturnRequest) (*OAuthReturnResponse, error) - ServiceConfiguration(context.Context, *types.Empty) (*Configuration, error) - JWKS(context.Context, *types.Empty) (*JWKSResponse, error) - HealthCheck(context.Context, *types.Empty) (*HealthCheckResponse, error) +// PasswordResetServiceServer is the server API for PasswordResetService service. +type PasswordResetServiceServer interface { + RequestPasswordReset(context.Context, *PasswordResetRequest) (*PasswordResetResponse, error) } -func RegisterPublicAuthNServer(s *grpc.Server, srv PublicAuthNServer) { - s.RegisterService(&_PublicAuthN_serviceDesc, srv) +func RegisterPasswordResetServiceServer(s *grpc.Server, srv PasswordResetServiceServer) { + s.RegisterService(&_PasswordResetService_serviceDesc, srv) } -func _PublicAuthN_Signup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignupRequest) +func _PasswordResetService_RequestPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PasswordResetRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PublicAuthNServer).Signup(ctx, in) + return srv.(PasswordResetServiceServer).RequestPasswordReset(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.PublicAuthN/Signup", + FullMethod: "/keratin.authn.PasswordResetService/RequestPasswordReset", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).Signup(ctx, req.(*SignupRequest)) + return srv.(PasswordResetServiceServer).RequestPasswordReset(ctx, req.(*PasswordResetRequest)) } return interceptor(ctx, in, info, handler) } -func _PublicAuthN_IsUsernameAvailable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsUsernameAvailableRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PublicAuthNServer).IsUsernameAvailable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.PublicAuthN/IsUsernameAvailable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).IsUsernameAvailable(ctx, req.(*IsUsernameAvailableRequest)) - } - return interceptor(ctx, in, info, handler) +var _PasswordResetService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "keratin.authn.PasswordResetService", + HandlerType: (*PasswordResetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RequestPasswordReset", + Handler: _PasswordResetService_RequestPasswordReset_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn.proto", } -func _PublicAuthN_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoginRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PublicAuthNServer).Login(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.PublicAuthN/Login", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).Login(ctx, req.(*LoginRequest)) - } - return interceptor(ctx, in, info, handler) +// PasswordlessServiceClient is the client API for PasswordlessService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PasswordlessServiceClient interface { + RequestPasswordlessLogin(ctx context.Context, in *RequestPasswordlessLoginRequest, opts ...grpc.CallOption) (*RequestPasswordlessLoginResponse, error) + SubmitPasswordlessLogin(ctx context.Context, in *SubmitPasswordlessLoginRequest, opts ...grpc.CallOption) (*SubmitPasswordlessLoginResponseEnvelope, error) } -func _PublicAuthN_RefreshSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { +type passwordlessServiceClient struct { + cc *grpc.ClientConn +} + +func NewPasswordlessServiceClient(cc *grpc.ClientConn) PasswordlessServiceClient { + return &passwordlessServiceClient{cc} +} + +func (c *passwordlessServiceClient) RequestPasswordlessLogin(ctx context.Context, in *RequestPasswordlessLoginRequest, opts ...grpc.CallOption) (*RequestPasswordlessLoginResponse, error) { + out := new(RequestPasswordlessLoginResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.PasswordlessService/RequestPasswordlessLogin", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(PublicAuthNServer).RefreshSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.PublicAuthN/RefreshSession", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).RefreshSession(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _PublicAuthN_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) - if err := dec(in); err != nil { +func (c *passwordlessServiceClient) SubmitPasswordlessLogin(ctx context.Context, in *SubmitPasswordlessLoginRequest, opts ...grpc.CallOption) (*SubmitPasswordlessLoginResponseEnvelope, error) { + out := new(SubmitPasswordlessLoginResponseEnvelope) + err := c.cc.Invoke(ctx, "/keratin.authn.PasswordlessService/SubmitPasswordlessLogin", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(PublicAuthNServer).Logout(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.PublicAuthN/Logout", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).Logout(ctx, req.(*types.Empty)) - } - return interceptor(ctx, in, info, handler) + return out, nil +} + +// PasswordlessServiceServer is the server API for PasswordlessService service. +type PasswordlessServiceServer interface { + RequestPasswordlessLogin(context.Context, *RequestPasswordlessLoginRequest) (*RequestPasswordlessLoginResponse, error) + SubmitPasswordlessLogin(context.Context, *SubmitPasswordlessLoginRequest) (*SubmitPasswordlessLoginResponseEnvelope, error) } -func _PublicAuthN_RequestPasswordlessLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func RegisterPasswordlessServiceServer(s *grpc.Server, srv PasswordlessServiceServer) { + s.RegisterService(&_PasswordlessService_serviceDesc, srv) +} + +func _PasswordlessService_RequestPasswordlessLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RequestPasswordlessLoginRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PublicAuthNServer).RequestPasswordlessLogin(ctx, in) + return srv.(PasswordlessServiceServer).RequestPasswordlessLogin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.PublicAuthN/RequestPasswordlessLogin", + FullMethod: "/keratin.authn.PasswordlessService/RequestPasswordlessLogin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).RequestPasswordlessLogin(ctx, req.(*RequestPasswordlessLoginRequest)) + return srv.(PasswordlessServiceServer).RequestPasswordlessLogin(ctx, req.(*RequestPasswordlessLoginRequest)) } return interceptor(ctx, in, info, handler) } -func _PublicAuthN_SubmitPasswordlessLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _PasswordlessService_SubmitPasswordlessLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SubmitPasswordlessLoginRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PublicAuthNServer).SubmitPasswordlessLogin(ctx, in) + return srv.(PasswordlessServiceServer).SubmitPasswordlessLogin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.PublicAuthN/SubmitPasswordlessLogin", + FullMethod: "/keratin.authn.PasswordlessService/SubmitPasswordlessLogin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).SubmitPasswordlessLogin(ctx, req.(*SubmitPasswordlessLoginRequest)) + return srv.(PasswordlessServiceServer).SubmitPasswordlessLogin(ctx, req.(*SubmitPasswordlessLoginRequest)) } return interceptor(ctx, in, info, handler) } -func _PublicAuthN_RequestPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PasswordResetRequest) - if err := dec(in); err != nil { +var _PasswordlessService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "keratin.authn.PasswordlessService", + HandlerType: (*PasswordlessServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RequestPasswordlessLogin", + Handler: _PasswordlessService_RequestPasswordlessLogin_Handler, + }, + { + MethodName: "SubmitPasswordlessLogin", + Handler: _PasswordlessService_SubmitPasswordlessLogin_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "authn.proto", +} + +// PublicAuthNClient is the client API for PublicAuthN service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PublicAuthNClient interface { + Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponseEnvelope, error) + Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) + RefreshSession(ctx context.Context, in *RefreshSessionRequest, opts ...grpc.CallOption) (*RefreshSessionResponseEnvelope, error) + ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponseEnvelope, error) + HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) +} + +type publicAuthNClient struct { + cc *grpc.ClientConn +} + +func NewPublicAuthNClient(cc *grpc.ClientConn) PublicAuthNClient { + return &publicAuthNClient{cc} +} + +func (c *publicAuthNClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponseEnvelope, error) { + out := new(LoginResponseEnvelope) + err := c.cc.Invoke(ctx, "/keratin.authn.PublicAuthN/Login", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(PublicAuthNServer).RequestPasswordReset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.PublicAuthN/RequestPasswordReset", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).RequestPasswordReset(ctx, req.(*PasswordResetRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _PublicAuthN_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangePasswordRequest) - if err := dec(in); err != nil { +func (c *publicAuthNClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) { + out := new(LogoutResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.PublicAuthN/Logout", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(PublicAuthNServer).ChangePassword(ctx, in) + return out, nil +} + +func (c *publicAuthNClient) RefreshSession(ctx context.Context, in *RefreshSessionRequest, opts ...grpc.CallOption) (*RefreshSessionResponseEnvelope, error) { + out := new(RefreshSessionResponseEnvelope) + err := c.cc.Invoke(ctx, "/keratin.authn.PublicAuthN/RefreshSession", in, out, opts...) + if err != nil { + return nil, err } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/grpc.PublicAuthN/ChangePassword", + return out, nil +} + +func (c *publicAuthNClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponseEnvelope, error) { + out := new(ChangePasswordResponseEnvelope) + err := c.cc.Invoke(ctx, "/keratin.authn.PublicAuthN/ChangePassword", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) + return out, nil +} + +func (c *publicAuthNClient) HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) { + out := new(HealthCheckResponse) + err := c.cc.Invoke(ctx, "/keratin.authn.PublicAuthN/HealthCheck", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil +} + +// PublicAuthNServer is the server API for PublicAuthN service. +type PublicAuthNServer interface { + Login(context.Context, *LoginRequest) (*LoginResponseEnvelope, error) + Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) + RefreshSession(context.Context, *RefreshSessionRequest) (*RefreshSessionResponseEnvelope, error) + ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponseEnvelope, error) + HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) } -func _PublicAuthN_BeginOAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BeginOAuthRequest) +func RegisterPublicAuthNServer(s *grpc.Server, srv PublicAuthNServer) { + s.RegisterService(&_PublicAuthN_serviceDesc, srv) +} + +func _PublicAuthN_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoginRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PublicAuthNServer).BeginOAuth(ctx, in) + return srv.(PublicAuthNServer).Login(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.PublicAuthN/BeginOAuth", + FullMethod: "/keratin.authn.PublicAuthN/Login", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).BeginOAuth(ctx, req.(*BeginOAuthRequest)) + return srv.(PublicAuthNServer).Login(ctx, req.(*LoginRequest)) } return interceptor(ctx, in, info, handler) } -func _PublicAuthN_OAuthReturn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OAuthReturnRequest) +func _PublicAuthN_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LogoutRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PublicAuthNServer).OAuthReturn(ctx, in) + return srv.(PublicAuthNServer).Logout(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.PublicAuthN/OAuthReturn", + FullMethod: "/keratin.authn.PublicAuthN/Logout", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).OAuthReturn(ctx, req.(*OAuthReturnRequest)) + return srv.(PublicAuthNServer).Logout(ctx, req.(*LogoutRequest)) } return interceptor(ctx, in, info, handler) } -func _PublicAuthN_ServiceConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) +func _PublicAuthN_RefreshSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefreshSessionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PublicAuthNServer).ServiceConfiguration(ctx, in) + return srv.(PublicAuthNServer).RefreshSession(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.PublicAuthN/ServiceConfiguration", + FullMethod: "/keratin.authn.PublicAuthN/RefreshSession", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).ServiceConfiguration(ctx, req.(*types.Empty)) + return srv.(PublicAuthNServer).RefreshSession(ctx, req.(*RefreshSessionRequest)) } return interceptor(ctx, in, info, handler) } -func _PublicAuthN_JWKS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) +func _PublicAuthN_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangePasswordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PublicAuthNServer).JWKS(ctx, in) + return srv.(PublicAuthNServer).ChangePassword(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.PublicAuthN/JWKS", + FullMethod: "/keratin.authn.PublicAuthN/ChangePassword", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).JWKS(ctx, req.(*types.Empty)) + return srv.(PublicAuthNServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) } return interceptor(ctx, in, info, handler) } func _PublicAuthN_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(HealthCheckRequest) if err := dec(in); err != nil { return nil, err } @@ -2143,70 +2478,34 @@ func _PublicAuthN_HealthCheck_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.PublicAuthN/HealthCheck", + FullMethod: "/keratin.authn.PublicAuthN/HealthCheck", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PublicAuthNServer).HealthCheck(ctx, req.(*types.Empty)) + return srv.(PublicAuthNServer).HealthCheck(ctx, req.(*HealthCheckRequest)) } return interceptor(ctx, in, info, handler) } var _PublicAuthN_serviceDesc = grpc.ServiceDesc{ - ServiceName: "grpc.PublicAuthN", + ServiceName: "keratin.authn.PublicAuthN", HandlerType: (*PublicAuthNServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "Signup", - Handler: _PublicAuthN_Signup_Handler, - }, - { - MethodName: "IsUsernameAvailable", - Handler: _PublicAuthN_IsUsernameAvailable_Handler, - }, { MethodName: "Login", Handler: _PublicAuthN_Login_Handler, }, - { - MethodName: "RefreshSession", - Handler: _PublicAuthN_RefreshSession_Handler, - }, { MethodName: "Logout", Handler: _PublicAuthN_Logout_Handler, }, { - MethodName: "RequestPasswordlessLogin", - Handler: _PublicAuthN_RequestPasswordlessLogin_Handler, - }, - { - MethodName: "SubmitPasswordlessLogin", - Handler: _PublicAuthN_SubmitPasswordlessLogin_Handler, - }, - { - MethodName: "RequestPasswordReset", - Handler: _PublicAuthN_RequestPasswordReset_Handler, + MethodName: "RefreshSession", + Handler: _PublicAuthN_RefreshSession_Handler, }, { MethodName: "ChangePassword", Handler: _PublicAuthN_ChangePassword_Handler, }, - { - MethodName: "BeginOAuth", - Handler: _PublicAuthN_BeginOAuth_Handler, - }, - { - MethodName: "OAuthReturn", - Handler: _PublicAuthN_OAuthReturn_Handler, - }, - { - MethodName: "ServiceConfiguration", - Handler: _PublicAuthN_ServiceConfiguration_Handler, - }, - { - MethodName: "JWKS", - Handler: _PublicAuthN_JWKS_Handler, - }, { MethodName: "HealthCheck", Handler: _PublicAuthN_HealthCheck_Handler, @@ -2322,7 +2621,225 @@ func (m *IsUsernameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *IsUsernameAvailableResponseEnvelope) Marshal() (dAtA []byte, err error) { +func (m *IsUsernameAvailableResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IsUsernameAvailableResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result { + dAtA[i] = 0x8 + i++ + if m.Result { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PasswordResetRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *PasswordResetResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PasswordResetResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *RequestPasswordlessLoginRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestPasswordlessLoginRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *RequestPasswordlessLoginResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestPasswordlessLoginResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *SubmitPasswordlessLoginRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubmitPasswordlessLoginRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Token) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) + i += copy(dAtA[i:], m.Token) + } + return i, nil +} + +func (m *SubmitPasswordlessLoginResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubmitPasswordlessLoginResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.IdToken) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) + i += copy(dAtA[i:], m.IdToken) + } + return i, nil +} + +func (m *SubmitPasswordlessLoginResponseEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubmitPasswordlessLoginResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Result != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n2, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func (m *LoginRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LoginRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if len(m.Password) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + return i, nil +} + +func (m *LoginResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2332,25 +2849,21 @@ func (m *IsUsernameAvailableResponseEnvelope) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *IsUsernameAvailableResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { +func (m *LoginResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if m.Result { - dAtA[i] = 0x8 - i++ - if m.Result { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.IdToken) > 0 { + dAtA[i] = 0xa i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) + i += copy(dAtA[i:], m.IdToken) } return i, nil } -func (m *LoginRequest) Marshal() (dAtA []byte, err error) { +func (m *LoginResponseEnvelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2360,27 +2873,25 @@ func (m *LoginRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LoginRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *LoginResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Username) > 0 { + if m.Result != nil { dAtA[i] = 0xa i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if len(m.Password) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n3, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 } return i, nil } -func (m *RequestPasswordlessLoginRequest) Marshal() (dAtA []byte, err error) { +func (m *LogoutRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2390,21 +2901,15 @@ func (m *RequestPasswordlessLoginRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RequestPasswordlessLoginRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *LogoutRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } return i, nil } -func (m *SubmitPasswordlessLoginRequest) Marshal() (dAtA []byte, err error) { +func (m *LogoutResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2414,21 +2919,15 @@ func (m *SubmitPasswordlessLoginRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SubmitPasswordlessLoginRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *LogoutResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Token) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) - i += copy(dAtA[i:], m.Token) - } return i, nil } -func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { +func (m *RefreshSessionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2438,21 +2937,15 @@ func (m *PasswordResetRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PasswordResetRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *RefreshSessionRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Username) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } return i, nil } -func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) { +func (m *RefreshSessionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2462,33 +2955,21 @@ func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *RefreshSessionResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Password) > 0 { + if len(m.IdToken) > 0 { dAtA[i] = 0xa i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - } - if len(m.Token) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) - i += copy(dAtA[i:], m.Token) - } - if len(m.CurrentPassword) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.CurrentPassword))) - i += copy(dAtA[i:], m.CurrentPassword) + i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) + i += copy(dAtA[i:], m.IdToken) } return i, nil } -func (m *BeginOAuthRequest) Marshal() (dAtA []byte, err error) { +func (m *RefreshSessionResponseEnvelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2498,27 +2979,25 @@ func (m *BeginOAuthRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BeginOAuthRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *RefreshSessionResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.ProviderName) > 0 { + if m.Result != nil { dAtA[i] = 0xa i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) - i += copy(dAtA[i:], m.ProviderName) - } - if len(m.RedirectURI) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.RedirectURI))) - i += copy(dAtA[i:], m.RedirectURI) + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n4, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 } return i, nil } -func (m *BeginOAuthResponse) Marshal() (dAtA []byte, err error) { +func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2528,21 +3007,33 @@ func (m *BeginOAuthResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BeginOAuthResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Provider) > 0 { + if len(m.Password) > 0 { dAtA[i] = 0xa i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Provider))) - i += copy(dAtA[i:], m.Provider) + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + if len(m.Token) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.Token))) + i += copy(dAtA[i:], m.Token) + } + if len(m.CurrentPassword) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintAuthn(dAtA, i, uint64(len(m.CurrentPassword))) + i += copy(dAtA[i:], m.CurrentPassword) } return i, nil } -func (m *OAuthReturnRequest) Marshal() (dAtA []byte, err error) { +func (m *ChangePasswordResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2552,21 +3043,21 @@ func (m *OAuthReturnRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *OAuthReturnRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ChangePasswordResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.ProviderName) > 0 { + if len(m.IdToken) > 0 { dAtA[i] = 0xa i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.ProviderName))) - i += copy(dAtA[i:], m.ProviderName) + i = encodeVarintAuthn(dAtA, i, uint64(len(m.IdToken))) + i += copy(dAtA[i:], m.IdToken) } return i, nil } -func (m *OAuthReturnResponse) Marshal() (dAtA []byte, err error) { +func (m *ChangePasswordResponseEnvelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2576,21 +3067,25 @@ func (m *OAuthReturnResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *OAuthReturnResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ChangePasswordResponseEnvelope) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Redirect) > 0 { + if m.Result != nil { dAtA[i] = 0xa i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Redirect))) - i += copy(dAtA[i:], m.Redirect) + i = encodeVarintAuthn(dAtA, i, uint64(m.Result.Size())) + n5, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 } return i, nil } -func (m *Configuration) Marshal() (dAtA []byte, err error) { +func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -2600,83 +3095,11 @@ func (m *Configuration) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Configuration) MarshalTo(dAtA []byte) (int, error) { +func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Issuer) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Issuer))) - i += copy(dAtA[i:], m.Issuer) - } - if len(m.ResponseTypesSupported) > 0 { - for _, s := range m.ResponseTypesSupported { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.SubjectTypesSupported) > 0 { - for _, s := range m.SubjectTypesSupported { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.IdTokenSigningAlgValuesSupported) > 0 { - for _, s := range m.IdTokenSigningAlgValuesSupported { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.ClaimsSupported) > 0 { - for _, s := range m.ClaimsSupported { - dAtA[i] = 0x2a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.JwksUri) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.JwksUri))) - i += copy(dAtA[i:], m.JwksUri) - } return i, nil } @@ -2728,90 +3151,6 @@ func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *Key) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Key) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Use) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Use))) - i += copy(dAtA[i:], m.Use) - } - if len(m.Alg) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Alg))) - i += copy(dAtA[i:], m.Alg) - } - if len(m.Kty) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kty))) - i += copy(dAtA[i:], m.Kty) - } - if len(m.Kid) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.Kid))) - i += copy(dAtA[i:], m.Kid) - } - if len(m.E) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.E))) - i += copy(dAtA[i:], m.E) - } - if len(m.N) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintAuthn(dAtA, i, uint64(len(m.N))) - i += copy(dAtA[i:], m.N) - } - return i, nil -} - -func (m *JWKSResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JWKSResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Keys) > 0 { - for _, msg := range m.Keys { - dAtA[i] = 0xa - i++ - i = encodeVarintAuthn(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - func encodeVarintAuthn(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -2874,17 +3213,19 @@ func (m *IsUsernameAvailableResponseEnvelope) Size() (n int) { return n } -func (m *LoginRequest) Size() (n int) { +func (m *PasswordResetRequest) Size() (n int) { var l int _ = l l = len(m.Username) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } + return n +} + +func (m *PasswordResetResponse) Size() (n int) { + var l int + _ = l return n } @@ -2898,6 +3239,12 @@ func (m *RequestPasswordlessLoginRequest) Size() (n int) { return n } +func (m *RequestPasswordlessLoginResponse) Size() (n int) { + var l int + _ = l + return n +} + func (m *SubmitPasswordlessLoginRequest) Size() (n int) { var l int _ = l @@ -2908,169 +3255,153 @@ func (m *SubmitPasswordlessLoginRequest) Size() (n int) { return n } -func (m *PasswordResetRequest) Size() (n int) { +func (m *SubmitPasswordlessLoginResponse) Size() (n int) { var l int _ = l - l = len(m.Username) + l = len(m.IdToken) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } return n } -func (m *ChangePasswordRequest) Size() (n int) { +func (m *SubmitPasswordlessLoginResponseEnvelope) Size() (n int) { var l int _ = l - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Token) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.CurrentPassword) - if l > 0 { + if m.Result != nil { + l = m.Result.Size() n += 1 + l + sovAuthn(uint64(l)) } return n } -func (m *BeginOAuthRequest) Size() (n int) { +func (m *LoginRequest) Size() (n int) { var l int _ = l - l = len(m.ProviderName) + l = len(m.Username) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } - l = len(m.RedirectURI) + l = len(m.Password) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } return n } -func (m *BeginOAuthResponse) Size() (n int) { +func (m *LoginResponse) Size() (n int) { var l int _ = l - l = len(m.Provider) + l = len(m.IdToken) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } return n } -func (m *OAuthReturnRequest) Size() (n int) { +func (m *LoginResponseEnvelope) Size() (n int) { var l int _ = l - l = len(m.ProviderName) - if l > 0 { + if m.Result != nil { + l = m.Result.Size() n += 1 + l + sovAuthn(uint64(l)) } return n } -func (m *OAuthReturnResponse) Size() (n int) { +func (m *LogoutRequest) Size() (n int) { var l int _ = l - l = len(m.Redirect) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } return n } -func (m *Configuration) Size() (n int) { +func (m *LogoutResponse) Size() (n int) { var l int _ = l - l = len(m.Issuer) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - if len(m.ResponseTypesSupported) > 0 { - for _, s := range m.ResponseTypesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.SubjectTypesSupported) > 0 { - for _, s := range m.SubjectTypesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.IdTokenSigningAlgValuesSupported) > 0 { - for _, s := range m.IdTokenSigningAlgValuesSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - if len(m.ClaimsSupported) > 0 { - for _, s := range m.ClaimsSupported { - l = len(s) - n += 1 + l + sovAuthn(uint64(l)) - } - } - l = len(m.JwksUri) + return n +} + +func (m *RefreshSessionRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *RefreshSessionResponse) Size() (n int) { + var l int + _ = l + l = len(m.IdToken) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } return n } -func (m *HealthCheckResponse) Size() (n int) { +func (m *RefreshSessionResponseEnvelope) Size() (n int) { var l int _ = l - if m.Http { - n += 2 - } - if m.Db { - n += 2 - } - if m.Redis { - n += 2 + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovAuthn(uint64(l)) } return n } -func (m *Key) Size() (n int) { +func (m *ChangePasswordRequest) Size() (n int) { var l int _ = l - l = len(m.Use) - if l > 0 { - n += 1 + l + sovAuthn(uint64(l)) - } - l = len(m.Alg) + l = len(m.Password) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } - l = len(m.Kty) + l = len(m.Token) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } - l = len(m.Kid) + l = len(m.CurrentPassword) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } - l = len(m.E) + return n +} + +func (m *ChangePasswordResponse) Size() (n int) { + var l int + _ = l + l = len(m.IdToken) if l > 0 { n += 1 + l + sovAuthn(uint64(l)) } - l = len(m.N) - if l > 0 { + return n +} + +func (m *ChangePasswordResponseEnvelope) Size() (n int) { + var l int + _ = l + if m.Result != nil { + l = m.Result.Size() n += 1 + l + sovAuthn(uint64(l)) } return n } -func (m *JWKSResponse) Size() (n int) { +func (m *HealthCheckRequest) Size() (n int) { var l int _ = l - if len(m.Keys) > 0 { - for _, e := range m.Keys { - l = e.Size() - n += 1 + l + sovAuthn(uint64(l)) - } + return n +} + +func (m *HealthCheckResponse) Size() (n int) { + var l int + _ = l + if m.Http { + n += 2 + } + if m.Db { + n += 2 + } + if m.Redis { + n += 2 } return n } @@ -3139,13 +3470,21 @@ func (this *IsUsernameAvailableResponseEnvelope) String() string { }, "") return s } -func (this *LoginRequest) String() string { +func (this *PasswordResetRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&LoginRequest{`, + s := strings.Join([]string{`&PasswordResetRequest{`, `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `}`, + }, "") + return s +} +func (this *PasswordResetResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PasswordResetResponse{`, `}`, }, "") return s @@ -3160,6 +3499,15 @@ func (this *RequestPasswordlessLoginRequest) String() string { }, "") return s } +func (this *RequestPasswordlessLoginResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RequestPasswordlessLoginResponse{`, + `}`, + }, "") + return s +} func (this *SubmitPasswordlessLoginRequest) String() string { if this == nil { return "nil" @@ -3170,117 +3518,153 @@ func (this *SubmitPasswordlessLoginRequest) String() string { }, "") return s } -func (this *PasswordResetRequest) String() string { +func (this *SubmitPasswordlessLoginResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PasswordResetRequest{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + s := strings.Join([]string{`&SubmitPasswordlessLoginResponse{`, + `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, `}`, }, "") return s } -func (this *ChangePasswordRequest) String() string { +func (this *SubmitPasswordlessLoginResponseEnvelope) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ChangePasswordRequest{`, + s := strings.Join([]string{`&SubmitPasswordlessLoginResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "SubmitPasswordlessLoginResponse", "SubmitPasswordlessLoginResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *LoginRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LoginRequest{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `Token:` + fmt.Sprintf("%v", this.Token) + `,`, - `CurrentPassword:` + fmt.Sprintf("%v", this.CurrentPassword) + `,`, `}`, }, "") return s } -func (this *BeginOAuthRequest) String() string { +func (this *LoginResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&BeginOAuthRequest{`, - `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, - `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, + s := strings.Join([]string{`&LoginResponse{`, + `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, `}`, }, "") return s } -func (this *BeginOAuthResponse) String() string { +func (this *LoginResponseEnvelope) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&BeginOAuthResponse{`, - `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, + s := strings.Join([]string{`&LoginResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "LoginResponse", "LoginResponse", 1) + `,`, `}`, }, "") return s } -func (this *OAuthReturnRequest) String() string { +func (this *LogoutRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&OAuthReturnRequest{`, - `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, + s := strings.Join([]string{`&LogoutRequest{`, `}`, }, "") return s } -func (this *OAuthReturnResponse) String() string { +func (this *LogoutResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&OAuthReturnResponse{`, - `Redirect:` + fmt.Sprintf("%v", this.Redirect) + `,`, + s := strings.Join([]string{`&LogoutResponse{`, `}`, }, "") return s } -func (this *Configuration) String() string { +func (this *RefreshSessionRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Configuration{`, - `Issuer:` + fmt.Sprintf("%v", this.Issuer) + `,`, - `ResponseTypesSupported:` + fmt.Sprintf("%v", this.ResponseTypesSupported) + `,`, - `SubjectTypesSupported:` + fmt.Sprintf("%v", this.SubjectTypesSupported) + `,`, - `IdTokenSigningAlgValuesSupported:` + fmt.Sprintf("%v", this.IdTokenSigningAlgValuesSupported) + `,`, - `ClaimsSupported:` + fmt.Sprintf("%v", this.ClaimsSupported) + `,`, - `JwksUri:` + fmt.Sprintf("%v", this.JwksUri) + `,`, + s := strings.Join([]string{`&RefreshSessionRequest{`, `}`, }, "") return s } -func (this *HealthCheckResponse) String() string { +func (this *RefreshSessionResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&HealthCheckResponse{`, - `Http:` + fmt.Sprintf("%v", this.Http) + `,`, - `Db:` + fmt.Sprintf("%v", this.Db) + `,`, - `Redis:` + fmt.Sprintf("%v", this.Redis) + `,`, + s := strings.Join([]string{`&RefreshSessionResponse{`, + `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, + `}`, + }, "") + return s +} +func (this *RefreshSessionResponseEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RefreshSessionResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "RefreshSessionResponse", "RefreshSessionResponse", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ChangePasswordRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ChangePasswordRequest{`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Token:` + fmt.Sprintf("%v", this.Token) + `,`, + `CurrentPassword:` + fmt.Sprintf("%v", this.CurrentPassword) + `,`, + `}`, + }, "") + return s +} +func (this *ChangePasswordResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ChangePasswordResponse{`, + `IdToken:` + fmt.Sprintf("%v", this.IdToken) + `,`, `}`, }, "") return s } -func (this *Key) String() string { +func (this *ChangePasswordResponseEnvelope) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Key{`, - `Use:` + fmt.Sprintf("%v", this.Use) + `,`, - `Alg:` + fmt.Sprintf("%v", this.Alg) + `,`, - `Kty:` + fmt.Sprintf("%v", this.Kty) + `,`, - `Kid:` + fmt.Sprintf("%v", this.Kid) + `,`, - `E:` + fmt.Sprintf("%v", this.E) + `,`, - `N:` + fmt.Sprintf("%v", this.N) + `,`, + s := strings.Join([]string{`&ChangePasswordResponseEnvelope{`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "ChangePasswordResponse", "ChangePasswordResponse", 1) + `,`, `}`, }, "") return s } -func (this *JWKSResponse) String() string { +func (this *HealthCheckRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&JWKSResponse{`, - `Keys:` + strings.Replace(fmt.Sprintf("%v", this.Keys), "Key", "Key", 1) + `,`, + s := strings.Join([]string{`&HealthCheckRequest{`, + `}`, + }, "") + return s +} +func (this *HealthCheckResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HealthCheckResponse{`, + `Http:` + fmt.Sprintf("%v", this.Http) + `,`, + `Db:` + fmt.Sprintf("%v", this.Db) + `,`, + `Redis:` + fmt.Sprintf("%v", this.Redis) + `,`, `}`, }, "") return s @@ -3589,7 +3973,156 @@ func (m *IsUsernameAvailableRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: IsUsernameAvailableRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IsUsernameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IsUsernameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Result = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PasswordResetRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PasswordResetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PasswordResetRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3642,7 +4175,7 @@ func (m *IsUsernameAvailableRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { +func (m *PasswordResetResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3665,32 +4198,12 @@ func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: wiretype end group for non-group") + return fmt.Errorf("proto: PasswordResetResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IsUsernameAvailableResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PasswordResetResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Result = bool(v != 0) default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -3712,7 +4225,7 @@ func (m *IsUsernameAvailableResponseEnvelope) Unmarshal(dAtA []byte) error { } return nil } -func (m *LoginRequest) Unmarshal(dAtA []byte) error { +func (m *RequestPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3735,10 +4248,10 @@ func (m *LoginRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LoginRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RequestPasswordlessLoginRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RequestPasswordlessLoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3770,35 +4283,56 @@ func (m *LoginRequest) Unmarshal(dAtA []byte) error { } m.Username = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if skippy < 0 { return ErrInvalidLengthAuthn } - postIndex := iNdEx + intStringLen - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestPasswordlessLoginResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestPasswordlessLoginResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestPasswordlessLoginResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -3820,7 +4354,7 @@ func (m *LoginRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *RequestPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { +func (m *SubmitPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3843,15 +4377,15 @@ func (m *RequestPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RequestPasswordlessLoginRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SubmitPasswordlessLoginRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RequestPasswordlessLoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubmitPasswordlessLoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3876,7 +4410,7 @@ func (m *RequestPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Username = string(dAtA[iNdEx:postIndex]) + m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3899,7 +4433,7 @@ func (m *RequestPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubmitPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { +func (m *SubmitPasswordlessLoginResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3922,15 +4456,15 @@ func (m *SubmitPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubmitPasswordlessLoginRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SubmitPasswordlessLoginResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubmitPasswordlessLoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubmitPasswordlessLoginResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3955,7 +4489,7 @@ func (m *SubmitPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Token = string(dAtA[iNdEx:postIndex]) + m.IdToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3978,7 +4512,7 @@ func (m *SubmitPasswordlessLoginRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PasswordResetRequest) Unmarshal(dAtA []byte) error { +func (m *SubmitPasswordlessLoginResponseEnvelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4001,17 +4535,17 @@ func (m *PasswordResetRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PasswordResetRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SubmitPasswordlessLoginResponseEnvelope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PasswordResetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubmitPasswordlessLoginResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -4021,20 +4555,24 @@ func (m *PasswordResetRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuthn } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Username = string(dAtA[iNdEx:postIndex]) + if m.Result == nil { + m.Result = &SubmitPasswordlessLoginResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -4057,7 +4595,7 @@ func (m *PasswordResetRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { +func (m *LoginRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4080,15 +4618,15 @@ func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ChangePasswordRequest: wiretype end group for non-group") + return fmt.Errorf("proto: LoginRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ChangePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LoginRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4113,40 +4651,11 @@ func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Password = string(dAtA[iNdEx:postIndex]) + m.Username = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentPassword", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4171,7 +4680,7 @@ func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CurrentPassword = string(dAtA[iNdEx:postIndex]) + m.Password = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4194,7 +4703,7 @@ func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BeginOAuthRequest) Unmarshal(dAtA []byte) error { +func (m *LoginResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4217,44 +4726,15 @@ func (m *BeginOAuthRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BeginOAuthRequest: wiretype end group for non-group") + return fmt.Errorf("proto: LoginResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BeginOAuthRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LoginResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedirectURI", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4279,7 +4759,7 @@ func (m *BeginOAuthRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RedirectURI = string(dAtA[iNdEx:postIndex]) + m.IdToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4302,7 +4782,7 @@ func (m *BeginOAuthRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BeginOAuthResponse) Unmarshal(dAtA []byte) error { +func (m *LoginResponseEnvelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4325,17 +4805,17 @@ func (m *BeginOAuthResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BeginOAuthResponse: wiretype end group for non-group") + return fmt.Errorf("proto: LoginResponseEnvelope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BeginOAuthResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LoginResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -4345,21 +4825,75 @@ func (m *BeginOAuthResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuthn } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Provider = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + if m.Result == nil { + m.Result = &LoginResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LogoutRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogoutRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogoutRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -4381,7 +4915,7 @@ func (m *BeginOAuthResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *OAuthReturnRequest) Unmarshal(dAtA []byte) error { +func (m *LogoutResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4404,41 +4938,12 @@ func (m *OAuthReturnRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OAuthReturnRequest: wiretype end group for non-group") + return fmt.Errorf("proto: LogoutResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthReturnRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LogoutResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -4460,7 +4965,7 @@ func (m *OAuthReturnRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *OAuthReturnResponse) Unmarshal(dAtA []byte) error { +func (m *RefreshSessionRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4483,41 +4988,12 @@ func (m *OAuthReturnResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OAuthReturnResponse: wiretype end group for non-group") + return fmt.Errorf("proto: RefreshSessionRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthReturnResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RefreshSessionRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redirect", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Redirect = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -4539,7 +5015,7 @@ func (m *OAuthReturnResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *Configuration) Unmarshal(dAtA []byte) error { +func (m *RefreshSessionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4562,160 +5038,15 @@ func (m *Configuration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Configuration: wiretype end group for non-group") + return fmt.Errorf("proto: RefreshSessionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Configuration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RefreshSessionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Issuer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseTypesSupported = append(m.ResponseTypesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubjectTypesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubjectTypesSupported = append(m.SubjectTypesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdTokenSigningAlgValuesSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IdTokenSigningAlgValuesSupported = append(m.IdTokenSigningAlgValuesSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimsSupported", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthn - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClaimsSupported = append(m.ClaimsSupported, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JwksUri", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4740,7 +5071,7 @@ func (m *Configuration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.JwksUri = string(dAtA[iNdEx:postIndex]) + m.IdToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4763,7 +5094,7 @@ func (m *Configuration) Unmarshal(dAtA []byte) error { } return nil } -func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { +func (m *RefreshSessionResponseEnvelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4786,57 +5117,17 @@ func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HealthCheckResponse: wiretype end group for non-group") + return fmt.Errorf("proto: RefreshSessionResponseEnvelope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HealthCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RefreshSessionResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Http = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Db", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Db = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Redis", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -4846,12 +5137,25 @@ func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - m.Redis = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthAuthn + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &RefreshSessionResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -4873,7 +5177,7 @@ func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *Key) Unmarshal(dAtA []byte) error { +func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4896,15 +5200,15 @@ func (m *Key) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Key: wiretype end group for non-group") + return fmt.Errorf("proto: ChangePasswordRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Key: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ChangePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Use", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4929,11 +5233,11 @@ func (m *Key) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Use = string(dAtA[iNdEx:postIndex]) + m.Password = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4958,11 +5262,11 @@ func (m *Key) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Alg = string(dAtA[iNdEx:postIndex]) + m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kty", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentPassword", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4987,40 +5291,61 @@ func (m *Key) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Kty = string(dAtA[iNdEx:postIndex]) + m.CurrentPassword = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthn - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if skippy < 0 { return ErrInvalidLengthAuthn } - postIndex := iNdEx + intStringLen - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Kid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangePasswordResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChangePasswordResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChangePasswordResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field E", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5045,13 +5370,63 @@ func (m *Key) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.E = string(dAtA[iNdEx:postIndex]) + m.IdToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChangePasswordResponseEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChangePasswordResponseEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChangePasswordResponseEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -5061,20 +5436,24 @@ func (m *Key) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAuthn } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.N = string(dAtA[iNdEx:postIndex]) + if m.Result == nil { + m.Result = &ChangePasswordResponse{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5097,7 +5476,57 @@ func (m *Key) Unmarshal(dAtA []byte) error { } return nil } -func (m *JWKSResponse) Unmarshal(dAtA []byte) error { +func (m *HealthCheckRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HealthCheckRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HealthCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAuthn(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAuthn + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5120,17 +5549,17 @@ func (m *JWKSResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: JWKSResponse: wiretype end group for non-group") + return fmt.Errorf("proto: HealthCheckResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: JWKSResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HealthCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAuthn @@ -5140,23 +5569,52 @@ func (m *JWKSResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthAuthn + m.Http = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Db", wireType) } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } } - m.Keys = append(m.Keys, &Key{}) - if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Db = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Redis", wireType) } - iNdEx = postIndex + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthn + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Redis = bool(v != 0) default: iNdEx = preIndex skippy, err := skipAuthn(dAtA[iNdEx:]) @@ -5283,82 +5741,68 @@ var ( ErrIntOverflowAuthn = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_75e9d4eb00e36a41) } - -var fileDescriptor_authn_75e9d4eb00e36a41 = []byte{ - // 1173 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x4e, 0x1b, 0xc7, - 0x17, 0x67, 0x6d, 0x30, 0xe6, 0x18, 0x0c, 0x19, 0x1b, 0x70, 0x1c, 0xb2, 0xa0, 0xf9, 0x27, 0xfa, - 0x93, 0xa8, 0xf1, 0xb6, 0x54, 0x8a, 0x68, 0xa5, 0x5e, 0x00, 0x4a, 0x5a, 0x42, 0x04, 0xc9, 0x3a, - 0xf4, 0x53, 0xaa, 0xb5, 0x5e, 0x0f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6d, 0x91, 0x70, 0xbf, 0x97, 0xe9, 0x80, 0x0e, 0xad, 0x41, 0x21, 0x24, 0x2d, - 0x1a, 0x12, 0x3b, 0x3a, 0x34, 0x77, 0x15, 0x7d, 0xbf, 0x0a, 0xbf, 0x0d, 0xa8, 0x1f, 0x5a, 0xb5, - 0x33, 0x2f, 0x46, 0xe1, 0xa4, 0xc5, 0x28, 0x19, 0x6f, 0x02, 0x52, 0xce, 0x51, 0x1c, 0x7a, 0xff, - 0x22, 0x1b, 0xfc, 0x0e, 0x94, 0x06, 0x22, 0x7b, 0x64, 0x49, 0x46, 0x09, 0x59, 0x22, 0xe3, 0x9f, - 0x33, 0x30, 0xb7, 0xe3, 0x7b, 0x47, 0xd4, 0x89, 0x43, 0xf1, 0x96, 0xd1, 0x12, 0xe4, 0x28, 0x63, - 0x71, 0x9a, 0x98, 0x92, 0xd0, 0x26, 0x54, 0x42, 0x85, 0xd8, 0x88, 0x3a, 0x01, 0x61, 0x0d, 0x16, - 0x07, 0x81, 0x1f, 0x46, 0x84, 0xf7, 0x5b, 0x76, 0x7d, 0xc6, 0x5c, 0x4a, 0xec, 0x4f, 0xb8, 0xb9, - 0x9e, 0x58, 0xd1, 0x5d, 0x58, 0x66, 0x71, 0xf3, 0x29, 0xb1, 0xa3, 0x73, 0x81, 0x59, 0x11, 0xb8, - 0xa8, 0xcc, 0x43, 0x71, 0x07, 0x70, 0x33, 0x79, 0xdf, 0x0d, 0x46, 0x1d, 0x8f, 0x7a, 0x4e, 0xc3, - 0x72, 0x9d, 0xc6, 0xa9, 0xe5, 0xc6, 0x03, 0x28, 0x93, 0x02, 0x65, 0x4d, 0x8d, 0x80, 0xba, 0x74, - 0xdd, 0x72, 0x9d, 0x8f, 0x85, 0x63, 0x0f, 0xf0, 0x16, 0x2c, 0xd8, 0xae, 0x45, 0x4f, 0xfa, 0x63, - 0xa7, 0x44, 0xec, 0xbc, 0xd4, 0xf7, 0x5c, 0xaf, 0x42, 0xfe, 0xe9, 0xf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4f, 0x7d, 0xe2, 0x73, - 0xf1, 0xeb, 0xde, 0xcc, 0x09, 0xbe, 0x77, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x76, 0x02, 0x9d, - 0x2c, 0xd6, 0x0b, 0x00, 0x00, +func init() { proto.RegisterFile("authn.proto", fileDescriptor_authn_56f86b1d6e0d04dd) } + +var fileDescriptor_authn_56f86b1d6e0d04dd = []byte{ + // 956 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x98, 0x34, 0x75, 0x5e, 0x1a, 0x27, 0x8c, 0xed, 0xc4, 0x6c, 0xd3, 0x4d, 0x99, 0xb6, + 0x6a, 0x89, 0x14, 0xaf, 0x64, 0xa0, 0x2a, 0x95, 0x7a, 0x48, 0x2a, 0x0a, 0x45, 0x40, 0xab, 0x0d, + 0x08, 0x89, 0x4b, 0xb4, 0x5e, 0x4f, 0x77, 0x57, 0x71, 0x76, 0xdc, 0x9d, 0xdd, 0x20, 0xc1, 0x01, + 0xc4, 0x89, 0x23, 0xd0, 0x23, 0x7f, 0x80, 0x03, 0x3f, 0x04, 0x6e, 0x95, 0xb8, 0x70, 0xaa, 0x88, + 0xe1, 0x80, 0x7a, 0xea, 0x4f, 0x40, 0x9e, 0xd9, 0x99, 0xd8, 0x93, 0xb5, 0xbb, 0xe9, 0x6d, 0x67, + 0xde, 0xbc, 0xf7, 0xbe, 0xf7, 0xbd, 0x37, 0xdf, 0x2c, 0x2c, 0x79, 0x59, 0x1a, 0xc6, 0xed, 0x41, + 0xc2, 0x52, 0x86, 0x97, 0x0f, 0x68, 0xe2, 0xa5, 0x51, 0xdc, 0x16, 0x9b, 0xd6, 0x76, 0x10, 0xa5, + 0x61, 0xd6, 0x6d, 0xfb, 0xec, 0xd0, 0x09, 0x58, 0xc0, 0x1c, 0x71, 0xaa, 0x9b,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d, 0x89, 0x20, 0x7e, 0xd3, 0x88, 0x79, 0x5a, 0x36, 0x2d, 0x32, 0xeb, 0x48, 0xce, 0xf2, + 0x8a, 0xc8, 0xb5, 0x88, 0xcf, 0x3b, 0xa1, 0xb0, 0xee, 0x76, 0x9e, 0x1e, 0xdb, 0x73, 0x7f, 0x1d, + 0xdb, 0x73, 0x2f, 0x8e, 0x6d, 0xf4, 0xdd, 0xd0, 0x46, 0xbf, 0x0e, 0x6d, 0xf4, 0xfb, 0xd0, 0x46, + 0x4f, 0x87, 0x36, 0xfa, 0x7b, 0x68, 0xa3, 0xff, 0x86, 0xf6, 0xdc, 0x8b, 0xa1, 0x8d, 0x7e, 0xfc, + 0xc7, 0x9e, 0xfb, 0x72, 0x3e, 0x48, 0x06, 0x7e, 0x77, 0x41, 0xfc, 0x87, 0xbf, 0xfd, 0x7f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x68, 0x6f, 0xff, 0xc5, 0xf2, 0x0b, 0x00, 0x00, } diff --git a/grpc/authn.pb.gw.go b/grpc/authn.pb.gw.go index d612c425f7..77003d8a5e 100644 --- a/grpc/authn.pb.gw.go +++ b/grpc/authn.pb.gw.go @@ -12,7 +12,6 @@ import ( "io" "net/http" - "github.com/gogo/protobuf/types" "github.com/golang/protobuf/proto" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" @@ -29,7 +28,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -func request_PublicAuthN_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SignupService_Signup_0(ctx context.Context, marshaler runtime.Marshaler, client SignupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SignupRequest var metadata runtime.ServerMetadata @@ -43,14 +42,14 @@ func request_PublicAuthN_Signup_0(ctx context.Context, marshaler runtime.Marshal } var ( - filter_PublicAuthN_IsUsernameAvailable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_SignupService_IsUsernameAvailable_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_PublicAuthN_IsUsernameAvailable_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SignupService_IsUsernameAvailable_0(ctx context.Context, marshaler runtime.Marshaler, client SignupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq IsUsernameAvailableRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_IsUsernameAvailable_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_SignupService_IsUsernameAvailable_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -59,46 +58,32 @@ func request_PublicAuthN_IsUsernameAvailable_0(ctx context.Context, marshaler ru } -func request_PublicAuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LoginRequest +var ( + filter_PasswordResetService_RequestPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_PasswordResetService_RequestPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client PasswordResetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PasswordResetRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PasswordResetService_RequestPasswordReset_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Login(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_PublicAuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty - var metadata runtime.ServerMetadata - - msg, err := client.RefreshSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_PublicAuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty - var metadata runtime.ServerMetadata - - msg, err := client.Logout(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.RequestPasswordReset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } var ( - filter_PublicAuthN_RequestPasswordlessLogin_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_PasswordlessService_RequestPasswordlessLogin_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_PublicAuthN_RequestPasswordlessLogin_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PasswordlessService_RequestPasswordlessLogin_0(ctx context.Context, marshaler runtime.Marshaler, client PasswordlessServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RequestPasswordlessLoginRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_RequestPasswordlessLogin_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PasswordlessService_RequestPasswordlessLogin_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -107,7 +92,7 @@ func request_PublicAuthN_RequestPasswordlessLogin_0(ctx context.Context, marshal } -func request_PublicAuthN_SubmitPasswordlessLogin_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_PasswordlessService_SubmitPasswordlessLogin_0(ctx context.Context, marshaler runtime.Marshaler, client PasswordlessServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SubmitPasswordlessLoginRequest var metadata runtime.ServerMetadata @@ -120,118 +105,52 @@ func request_PublicAuthN_SubmitPasswordlessLogin_0(ctx context.Context, marshale } -var ( - filter_PublicAuthN_RequestPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_PublicAuthN_RequestPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PasswordResetRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_RequestPasswordReset_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.RequestPasswordReset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_PublicAuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePasswordRequest +func request_PublicAuthN_Login_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LoginRequest var metadata runtime.ServerMetadata if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ChangePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Login(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -var ( - filter_PublicAuthN_BeginOAuth_0 = &utilities.DoubleArray{Encoding: map[string]int{"providerName": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_PublicAuthN_BeginOAuth_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq BeginOAuthRequest +func request_PublicAuthN_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LogoutRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["providerName"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "providerName") - } - - protoReq.ProviderName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "providerName", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PublicAuthN_BeginOAuth_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.BeginOAuth(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Logout(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func request_PublicAuthN_OAuthReturn_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq OAuthReturnRequest +func request_PublicAuthN_RefreshSession_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RefreshSessionRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["providerName"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "providerName") - } - - protoReq.ProviderName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "providerName", err) - } - - msg, err := client.OAuthReturn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.RefreshSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func request_PublicAuthN_ServiceConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty +func request_PublicAuthN_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ChangePasswordRequest var metadata runtime.ServerMetadata - msg, err := client.ServiceConfiguration(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func request_PublicAuthN_JWKS_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty - var metadata runtime.ServerMetadata + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } - msg, err := client.JWKS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ChangePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func request_PublicAuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, client PublicAuthNClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq types.Empty + var protoReq HealthCheckRequest var metadata runtime.ServerMetadata msg, err := client.HealthCheck(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -239,9 +158,9 @@ func request_PublicAuthN_HealthCheck_0(ctx context.Context, marshaler runtime.Ma } -// RegisterPublicAuthNHandlerFromEndpoint is same as RegisterPublicAuthNHandler but +// RegisterSignupServiceHandlerFromEndpoint is same as RegisterSignupServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterPublicAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterSignupServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err @@ -261,23 +180,23 @@ func RegisterPublicAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.Se }() }() - return RegisterPublicAuthNHandler(ctx, mux, conn) + return RegisterSignupServiceHandler(ctx, mux, conn) } -// RegisterPublicAuthNHandler registers the http handlers for service PublicAuthN to "mux". +// RegisterSignupServiceHandler registers the http handlers for service SignupService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterPublicAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterPublicAuthNHandlerClient(ctx, mux, NewPublicAuthNClient(conn)) +func RegisterSignupServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSignupServiceHandlerClient(ctx, mux, NewSignupServiceClient(conn)) } -// RegisterPublicAuthNHandlerClient registers the http handlers for service PublicAuthN -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PublicAuthNClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PublicAuthNClient" +// RegisterSignupServiceHandlerClient registers the http handlers for service SignupService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SignupServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SignupServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PublicAuthNClient" to call the correct interceptors. -func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PublicAuthNClient) error { +// "SignupServiceClient" to call the correct interceptors. +func RegisterSignupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignupServiceClient) error { - mux.Handle("POST", pattern_PublicAuthN_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SignupService_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -286,18 +205,18 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_Signup_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SignupService_Signup_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_Signup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SignupService_Signup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PublicAuthN_IsUsernameAvailable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SignupService_IsUsernameAvailable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -306,58 +225,71 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_IsUsernameAvailable_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SignupService_IsUsernameAvailable_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_IsUsernameAvailable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SignupService_IsUsernameAvailable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PublicAuthN_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PublicAuthN_Login_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } + return nil +} - forward_PublicAuthN_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) +var ( + pattern_SignupService_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"accounts"}, "")) - }) + pattern_SignupService_IsUsernameAvailable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "available"}, "")) +) - mux.Handle("GET", pattern_PublicAuthN_RefreshSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PublicAuthN_RefreshSession_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) +var ( + forward_SignupService_Signup_0 = runtime.ForwardResponseMessage + + forward_SignupService_IsUsernameAvailable_0 = runtime.ForwardResponseMessage +) + +// RegisterPasswordResetServiceHandlerFromEndpoint is same as RegisterPasswordResetServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPasswordResetServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } return } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() - forward_PublicAuthN_RefreshSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + return RegisterPasswordResetServiceHandler(ctx, mux, conn) +} - }) +// RegisterPasswordResetServiceHandler registers the http handlers for service PasswordResetService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPasswordResetServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPasswordResetServiceHandlerClient(ctx, mux, NewPasswordResetServiceClient(conn)) +} - mux.Handle("DELETE", pattern_PublicAuthN_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { +// RegisterPasswordResetServiceHandlerClient registers the http handlers for service PasswordResetService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PasswordResetServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PasswordResetServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PasswordResetServiceClient" to call the correct interceptors. +func RegisterPasswordResetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PasswordResetServiceClient) error { + + mux.Handle("GET", pattern_PasswordResetService_RequestPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -366,38 +298,67 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_Logout_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PasswordResetService_RequestPasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PasswordResetService_RequestPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PublicAuthN_RequestPasswordlessLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PublicAuthN_RequestPasswordlessLogin_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + return nil +} + +var ( + pattern_PasswordResetService_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"password", "reset"}, "")) +) + +var ( + forward_PasswordResetService_RequestPasswordReset_0 = runtime.ForwardResponseMessage +) + +// RegisterPasswordlessServiceHandlerFromEndpoint is same as RegisterPasswordlessServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPasswordlessServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } return } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() - forward_PublicAuthN_RequestPasswordlessLogin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + return RegisterPasswordlessServiceHandler(ctx, mux, conn) +} - }) +// RegisterPasswordlessServiceHandler registers the http handlers for service PasswordlessService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPasswordlessServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPasswordlessServiceHandlerClient(ctx, mux, NewPasswordlessServiceClient(conn)) +} + +// RegisterPasswordlessServiceHandlerClient registers the http handlers for service PasswordlessService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PasswordlessServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PasswordlessServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PasswordlessServiceClient" to call the correct interceptors. +func RegisterPasswordlessServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PasswordlessServiceClient) error { - mux.Handle("POST", pattern_PublicAuthN_SubmitPasswordlessLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PasswordlessService_RequestPasswordlessLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -406,18 +367,18 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_SubmitPasswordlessLogin_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PasswordlessService_RequestPasswordlessLogin_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_SubmitPasswordlessLogin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PasswordlessService_RequestPasswordlessLogin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PublicAuthN_RequestPasswordReset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PasswordlessService_SubmitPasswordlessLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -426,38 +387,71 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_RequestPasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PasswordlessService_SubmitPasswordlessLogin_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_RequestPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PasswordlessService_SubmitPasswordlessLogin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PublicAuthN_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PublicAuthN_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + return nil +} + +var ( + pattern_PasswordlessService_RequestPasswordlessLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"session", "token"}, "")) + + pattern_PasswordlessService_SubmitPasswordlessLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"session", "token"}, "")) +) + +var ( + forward_PasswordlessService_RequestPasswordlessLogin_0 = runtime.ForwardResponseMessage + + forward_PasswordlessService_SubmitPasswordlessLogin_0 = runtime.ForwardResponseMessage +) + +// RegisterPublicAuthNHandlerFromEndpoint is same as RegisterPublicAuthNHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPublicAuthNHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } return } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() - forward_PublicAuthN_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + return RegisterPublicAuthNHandler(ctx, mux, conn) +} - }) +// RegisterPublicAuthNHandler registers the http handlers for service PublicAuthN to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPublicAuthNHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPublicAuthNHandlerClient(ctx, mux, NewPublicAuthNClient(conn)) +} - mux.Handle("GET", pattern_PublicAuthN_BeginOAuth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { +// RegisterPublicAuthNHandlerClient registers the http handlers for service PublicAuthN +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PublicAuthNClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PublicAuthNClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PublicAuthNClient" to call the correct interceptors. +func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PublicAuthNClient) error { + + mux.Handle("POST", pattern_PublicAuthN_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -466,18 +460,18 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_BeginOAuth_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_Login_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_BeginOAuth_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PublicAuthN_OAuthReturn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_PublicAuthN_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -486,18 +480,18 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_OAuthReturn_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_Logout_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_OAuthReturn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PublicAuthN_ServiceConfiguration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_PublicAuthN_RefreshSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -506,18 +500,18 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_ServiceConfiguration_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_RefreshSession_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_ServiceConfiguration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_RefreshSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PublicAuthN_JWKS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_PublicAuthN_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -526,14 +520,14 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PublicAuthN_JWKS_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_PublicAuthN_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_PublicAuthN_JWKS_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PublicAuthN_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -561,61 +555,25 @@ func RegisterPublicAuthNHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_PublicAuthN_Signup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"accounts"}, "")) - - pattern_PublicAuthN_IsUsernameAvailable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"accounts", "available"}, "")) - pattern_PublicAuthN_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_PublicAuthN_RefreshSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_PublicAuthN_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"session"}, "")) - pattern_PublicAuthN_RequestPasswordlessLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"session", "token"}, "")) - - pattern_PublicAuthN_SubmitPasswordlessLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"session", "token"}, "")) - - pattern_PublicAuthN_RequestPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"password", "reset"}, "")) + pattern_PublicAuthN_RefreshSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"session", "refresh"}, "")) pattern_PublicAuthN_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"password"}, "")) - pattern_PublicAuthN_BeginOAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"oauth", "providerName"}, "")) - - pattern_PublicAuthN_OAuthReturn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"oauth", "providerName", "return"}, "")) - - pattern_PublicAuthN_ServiceConfiguration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"configuration"}, "")) - - pattern_PublicAuthN_JWKS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"jwks"}, "")) - pattern_PublicAuthN_HealthCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"health"}, "")) ) var ( - forward_PublicAuthN_Signup_0 = runtime.ForwardResponseMessage - - forward_PublicAuthN_IsUsernameAvailable_0 = runtime.ForwardResponseMessage - forward_PublicAuthN_Login_0 = runtime.ForwardResponseMessage - forward_PublicAuthN_RefreshSession_0 = runtime.ForwardResponseMessage - forward_PublicAuthN_Logout_0 = runtime.ForwardResponseMessage - forward_PublicAuthN_RequestPasswordlessLogin_0 = runtime.ForwardResponseMessage - - forward_PublicAuthN_SubmitPasswordlessLogin_0 = runtime.ForwardResponseMessage - - forward_PublicAuthN_RequestPasswordReset_0 = runtime.ForwardResponseMessage + forward_PublicAuthN_RefreshSession_0 = runtime.ForwardResponseMessage forward_PublicAuthN_ChangePassword_0 = runtime.ForwardResponseMessage - forward_PublicAuthN_BeginOAuth_0 = runtime.ForwardResponseMessage - - forward_PublicAuthN_OAuthReturn_0 = runtime.ForwardResponseMessage - - forward_PublicAuthN_ServiceConfiguration_0 = runtime.ForwardResponseMessage - - forward_PublicAuthN_JWKS_0 = runtime.ForwardResponseMessage - forward_PublicAuthN_HealthCheck_0 = runtime.ForwardResponseMessage ) diff --git a/grpc/authn.pb_test.go b/grpc/authn.pb_test.go deleted file mode 100644 index 367f9ca1bd..0000000000 --- a/grpc/authn.pb_test.go +++ /dev/null @@ -1,48 +0,0 @@ -package grpc - -import ( - "context" - "log" - "net" - "runtime" - "testing" - - "google.golang.org/grpc" -) - -func TestServer(t *testing.T) { - - addr := "localhost:0" - lis, err := net.Listen("tcp", addr) - if err != nil { - log.Fatalf("failed to initializa TCP listen: %v", err) - } - defer lis.Close() - srv := NewServer(lis, nil) - - ctx := context.Background() - go srv.RunGRPC(ctx) - - runtime.Gosched() - - cc, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - t.Logf("failed to dial: %s", err) - t.FailNow() - } - - client := NewPublicAuthNClient(cc) - - signupForm := &SignupRequest{ - Username: "cool-username", - Password: "supersecurepassword", - } - - res, signErr := client.Signup(ctx, signupForm) - if signErr != nil { - t.Logf("failed to call Signup: %s", signErr) - t.FailNow() - } - t.Logf("%s", res) - -} diff --git a/grpc/authn.proto b/grpc/authn.proto index c2b9b86807..8a31663941 100644 --- a/grpc/authn.proto +++ b/grpc/authn.proto @@ -1,9 +1,8 @@ syntax = "proto3"; -package grpc; +package keratin.authn; option go_package = "grpc"; -import "google/protobuf/empty.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "google/api/annotations.proto"; @@ -18,70 +17,13 @@ message SignupResponse { message SignupResponseEnvelope { SignupResponse result = 1; } - message IsUsernameAvailableRequest { string username = 1; } message IsUsernameAvailableResponseEnvelope { bool result = 1 [ (gogoproto.jsontag) = "result" ]; } -message LoginRequest { - string username = 1; - string password = 2; -} - -message RequestPasswordlessLoginRequest { - string username = 1; -} - -message SubmitPasswordlessLoginRequest { - string token = 1; -} - -message PasswordResetRequest { string username = 1; } - -message ChangePasswordRequest { - string password = 1; - string token = 2; - string currentPassword = 3; -} - - -message BeginOAuthRequest { - string providerName = 1; - string redirectURI = 2; -} -message BeginOAuthResponse { string provider = 1; } - -message OAuthReturnRequest { string providerName = 1; } -message OAuthReturnResponse { string redirect = 1; } - -message Configuration { - string issuer = 1; - repeated string response_types_supported = 2; - repeated string subject_types_supported = 3; - repeated string id_token_signing_alg_values_supported = 4; - repeated string claims_supported = 5; - string jwks_uri = 6; -} - -message HealthCheckResponse { - bool http = 1; - bool db = 2; - bool redis = 3; -} - -message Key { - string use = 1; - string alg = 2; - string kty = 3; - string kid = 4; - string e = 5; - string n = 6; -} -message JWKSResponse { repeated Key keys = 1; } - -service PublicAuthN { - +// SignupService is made independant to only be registered if Signup is enabled +service SignupService { rpc Signup(SignupRequest) returns (SignupResponseEnvelope) { option (google.api.http) = { post : "/accounts", @@ -95,78 +37,142 @@ service PublicAuthN { get : "/accounts/available" }; } +} - rpc Login(LoginRequest) returns (SignupResponseEnvelope) { - option (google.api.http) = { - post : "/session", - body : "*" - }; - } +message PasswordResetRequest { string username = 1; } +message PasswordResetResponse {} - rpc RefreshSession(google.protobuf.Empty) returns (SignupResponseEnvelope) { +service PasswordResetService { + rpc RequestPasswordReset(PasswordResetRequest) + returns (PasswordResetResponse) { option (google.api.http) = { - get : "/session" + get : "/password/reset" }; } +} - rpc Logout(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete : "/session" - }; - } +message RequestPasswordlessLoginRequest { string username = 1; } +message RequestPasswordlessLoginResponse {} + +message SubmitPasswordlessLoginRequest { string token = 1; } - rpc RequestPasswordlessLogin(RequestPasswordlessLoginRequest) returns (google.protobuf.Empty) { +message SubmitPasswordlessLoginResponse { + string id_token = 1 [ (gogoproto.jsontag) = "id_token" ]; +} + +message SubmitPasswordlessLoginResponseEnvelope { + SubmitPasswordlessLoginResponse result = 1; +} + +service PasswordlessService { + rpc RequestPasswordlessLogin(RequestPasswordlessLoginRequest) + returns (RequestPasswordlessLoginResponse) { option (google.api.http) = { get : "/session/token" }; } - rpc SubmitPasswordlessLogin(SubmitPasswordlessLoginRequest) returns (SignupResponseEnvelope) { + rpc SubmitPasswordlessLogin(SubmitPasswordlessLoginRequest) + returns (SubmitPasswordlessLoginResponseEnvelope) { option (google.api.http) = { - post: "/session/token", + post : "/session/token" body : "*" }; } +} - rpc RequestPasswordReset(PasswordResetRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - get : "/password/reset" - }; - } +// Draft OAuth. +// TODO: Implement OAuth API surface on top of gRPC, if possible. As of now, OAuth is handled outside of gRPC-Gateway. +// +// message BeginOAuthRequest { +// string providerName = 1; +// string redirectURI = 2; +// } +// message BeginOAuthResponse { string provider = 1; } +// message OAuthReturnRequest { string providerName = 1; } +// message OAuthReturnResponse { string redirect = 1; } +// service OAuthService { +// rpc BeginOAuth(BeginOAuthRequest) returns (BeginOAuthResponse) { +// option (google.api.http) = { +// get : "/oauth/{providerName}" +// }; +// } +// rpc OAuthReturn(OAuthReturnRequest) returns (OAuthReturnResponse) { +// option (google.api.http) = { +// get : "/oauth/{providerName}/return" +// }; +// } +// } - rpc ChangePassword(ChangePasswordRequest) returns (SignupResponseEnvelope) { - option (google.api.http) = { - post : "/password", - body : "*" - }; - } +message LoginRequest { + string username = 1; + string password = 2; +} + +message LoginResponse { + string id_token = 1 [ (gogoproto.jsontag) = "id_token" ]; +} + +message LoginResponseEnvelope { LoginResponse result = 1; } + +message LogoutRequest {} +message LogoutResponse {} - rpc BeginOAuth(BeginOAuthRequest) returns (BeginOAuthResponse) { +message RefreshSessionRequest {} +message RefreshSessionResponse { + string id_token = 1 [ (gogoproto.jsontag) = "id_token" ]; +} +message RefreshSessionResponseEnvelope { RefreshSessionResponse result = 1; } + +message ChangePasswordRequest { + string password = 1; + string token = 2; + string currentPassword = 3; +} + +message ChangePasswordResponse { + string id_token = 1 [ (gogoproto.jsontag) = "id_token" ]; +} +message ChangePasswordResponseEnvelope { ChangePasswordResponse result = 1; } + +message HealthCheckRequest {} +message HealthCheckResponse { + bool http = 1; + bool db = 2; + bool redis = 3; +} + +service PublicAuthN { + + rpc Login(LoginRequest) returns (LoginResponseEnvelope) { option (google.api.http) = { - get : "/oauth/{providerName}" + post : "/session" + body : "*" }; } - rpc OAuthReturn(OAuthReturnRequest) returns (OAuthReturnResponse) { + rpc Logout(LogoutRequest) returns (LogoutResponse) { option (google.api.http) = { - get : "/oauth/{providerName}/return" + delete : "/session" }; } - rpc ServiceConfiguration(google.protobuf.Empty) returns (Configuration) { + rpc RefreshSession(RefreshSessionRequest) + returns (RefreshSessionResponseEnvelope) { option (google.api.http) = { - get : "/configuration" + get : "/session/refresh" }; } - rpc JWKS(google.protobuf.Empty) returns (JWKSResponse) { + rpc ChangePassword(ChangePasswordRequest) + returns (ChangePasswordResponseEnvelope) { option (google.api.http) = { - get : "/jwks" + post : "/password" + body : "*" }; } - rpc HealthCheck(google.protobuf.Empty) returns (HealthCheckResponse) { + rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse) { option (google.api.http) = { get : "/health" }; diff --git a/grpc/internal/errors/errors.go b/grpc/internal/errors/errors.go new file mode 100644 index 0000000000..98ec998caf --- /dev/null +++ b/grpc/internal/errors/errors.go @@ -0,0 +1,102 @@ +package errors + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "strings" + + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/keratin/authn-server/services" + "google.golang.org/genproto/googleapis/rpc/errdetails" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +const wwwAuthneticate = `WWW-Authenticate` + +type FieldError struct { + Field string `json:"field"` + Message string `json:"message"` +} + +func (e FieldError) String() string { + return fmt.Sprintf("%v: %v", e.Field, e.Message) +} + +type FieldErrors []FieldError + +type ServiceErrors struct { + Errors FieldErrors `json:"errors"` +} + +func (es FieldErrors) Error() string { + var buf = make([]string, len(es)) + for i, e := range es { + buf[i] = e.String() + } + return strings.Join(buf, ", ") +} + +func ToStatusErrorWithDetails(fes services.FieldErrors, errCode codes.Code) *status.Status { + br := &errdetails.BadRequest{} + for _, fe := range fes { + br.FieldViolations = append(br.FieldViolations, &errdetails.BadRequest_FieldViolation{ + Field: fe.Field, + Description: fe.Message, + }) + } + statusError := status.New(errCode, fes.Error()) + statusEr, e := statusError.WithDetails(br) + if e != nil { + panic(fmt.Sprintf("Unexpected error attaching details to error: %v", e)) + } + return statusEr +} + +// CustomHTTPError is a custom error handler to write the error JSON obeying the pre-defined error JSON structure +func CustomHTTPError(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, req *http.Request, err error) { + + md, _ := runtime.ServerMetadataFromContext(ctx) + authen := md.HeaderMD.Get(wwwAuthneticate) + + statusError := status.Convert(err) + + // Basic-Auth failure + if statusError.Code() == codes.Unauthenticated && len(authen) > 0 { + w.Header().Set(wwwAuthneticate, `Basic realm="Private AuthN Realm"`) + w.WriteHeader(401) + w.Write([]byte("Unauthorized.\n")) + return + } + + for _, detail := range statusError.Details() { + + switch t := detail.(type) { + case *errdetails.BadRequest: + + if statusError.Code() == codes.NotFound { + w.WriteHeader(http.StatusNotFound) + } else { + w.WriteHeader(http.StatusUnprocessableEntity) + } + + // Convert the errors back to AuthN's custom error responses to preserve the shape of the returned error + fes := FieldErrors{} + for _, violation := range t.GetFieldViolations() { + fes = append(fes, FieldError{Field: violation.GetField(), Message: violation.GetDescription()}) + } + j, er := json.Marshal(ServiceErrors{fes}) + if er != nil { + panic(er) + } + w.Header().Set("Content-Type", "application/json") + w.Write(j) + + default: + // Fallback to the default error handler + runtime.DefaultHTTPError(ctx, mux, marshaler, w, req, err) + } + } +} diff --git a/grpc/internal/gateway/gateway.go b/grpc/internal/gateway/gateway.go new file mode 100644 index 0000000000..a47893251c --- /dev/null +++ b/grpc/internal/gateway/gateway.go @@ -0,0 +1,89 @@ +package gateway + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "strings" + "time" + + log "github.com/sirupsen/logrus" + + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/keratin/authn-server/api" + "github.com/keratin/authn-server/config" + authnpb "github.com/keratin/authn-server/grpc" +) + +type GatewayResponseMiddleware func(ctx context.Context, response http.ResponseWriter, m proto.Message) error + +// StatusCodeMutator changes the HTTP Repsonse status code to the desired mapping. The default mapping +// by gRPC-Gateway doesn't have some of the desired responses (e.g. 201), which is why this function is needed. +func StatusCodeMutator(ctx context.Context, response http.ResponseWriter, m proto.Message) error { + log.Printf("%s: message type: %T", time.Now(), m) + switch m.(type) { + case *authnpb.SignupResponseEnvelope, *authnpb.LoginResponseEnvelope, *authnpb.RefreshSessionResponseEnvelope, *authnpb.SubmitPasswordlessLoginResponseEnvelope, *authnpb.ChangePasswordResponseEnvelope: + response.WriteHeader(http.StatusCreated) + } + return nil +} + +// CookieSetter extracts the session cookie from metadata and assigns it to a cookie. If the session +// value is an empty string, then the cookie is marked to be removed. +func CookieSetter(cfg *config.Config) GatewayResponseMiddleware { + return func(ctx context.Context, response http.ResponseWriter, m proto.Message) error { + switch m.(type) { + case *authnpb.LogoutResponse, *authnpb.SignupResponseEnvelope, *authnpb.LoginResponseEnvelope: + md, ok := runtime.ServerMetadataFromContext(ctx) + if !ok { + return fmt.Errorf("Failed to extract ServerMetadata from context") + } + ss := md.HeaderMD.Get(cfg.SessionCookieName) + if len(ss) != 1 { + return fmt.Errorf("Received more than a single session value") + } + api.SetSession(cfg, response, ss[0]) + } + return nil + } +} + +// FormWrapper takes form values from application/x-www-form-urlencoded and converts it to JSON +// Workaround from: https://github.com/grpc-ecosystem/grpc-gateway/issues/7#issuecomment-358569373 +func FormWrapper(mux http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if strings.ToLower(strings.Split(r.Header.Get("Content-Type"), ";")[0]) == "application/x-www-form-urlencoded" { + if err := r.ParseForm(); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + log.Println("Bad form request", err.Error()) + return + } + jsonMap := make(map[string]interface{}, len(r.Form)) + for k, v := range r.Form { + if len(v) > 0 { + jsonMap[k] = v[0] + } + } + jsonBody, err := json.Marshal(jsonMap) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + } + r.Body = ioutil.NopCloser(bytes.NewReader(jsonBody)) + r.ContentLength = int64(len(jsonBody)) + r.Header.Set("Content-Type", "application/json") + } + mux.ServeHTTP(w, r) + }) +} + +// HeaderPrinter logs the headers of the request +func HeaderPrinter(mux http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + log.Println(r.Header) + mux.ServeHTTP(w, r) + }) +} diff --git a/grpc/internal/gateway/router.go b/grpc/internal/gateway/router.go new file mode 100644 index 0000000000..1ab25c3170 --- /dev/null +++ b/grpc/internal/gateway/router.go @@ -0,0 +1,29 @@ +package gateway + +import ( + "net/http" + "os" + + gorilla "github.com/gorilla/handlers" + "github.com/keratin/authn-server/api" + "github.com/keratin/authn-server/ops" +) + +func WrapRouter(r http.Handler, app *api.App) http.Handler { + stack := gorilla.CombinedLoggingHandler(os.Stdout, r) + + stack = api.Session(app)(stack) + + stack = gorilla.CORS( + gorilla.AllowedMethods([]string{"GET", "POST", "PUT", "PATCH", "DELETE"}), + gorilla.AllowCredentials(), + gorilla.AllowedOrigins([]string{}), // see: https://github.com/gorilla/handlers/issues/117 + gorilla.AllowedOriginValidator(api.OriginValidator(app.Config.ApplicationDomains)), + )(stack) + + if app.Config.Proxied { + stack = gorilla.ProxyHeaders(stack) + } + + return ops.PanicHandler(app.Reporter, stack) +} diff --git a/grpc/private/gateway.go b/grpc/private/gateway.go new file mode 100644 index 0000000000..773c9d4886 --- /dev/null +++ b/grpc/private/gateway.go @@ -0,0 +1,80 @@ +package private + +import ( + "bytes" + "net" + "net/http" + + "github.com/gorilla/mux" + log "github.com/sirupsen/logrus" + + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/keratin/authn-server/api" + "github.com/keratin/authn-server/api/views" + authnpb "github.com/keratin/authn-server/grpc" + "github.com/keratin/authn-server/grpc/internal/gateway" + "github.com/keratin/authn-server/grpc/public" + "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +func RunPrivateGateway(ctx context.Context, app *api.App, r *mux.Router, conn *grpc.ClientConn, l net.Listener) error { + + gmux := runtime.NewServeMux( + runtime.WithForwardResponseOption(gateway.StatusCodeMutator), + runtime.WithMarshalerOption("*", &runtime.JSONPb{ + OrigName: true, + EmitDefaults: true, + }), + ) + + r.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { + if req.URL.Path == "/" { + var buf bytes.Buffer + views.Root(&buf) + + w.Header().Set("Content-Type", "text/html") + w.WriteHeader(http.StatusOK) + w.Write(buf.Bytes()) + return + } + }) + + public.RegisterPublicGatewayHandlers(ctx, app, r, gmux, conn) + public.RegisterRoutes(r, app, gmux) + + err := authnpb.RegisterSecuredAdminAuthNHandler(ctx, gmux, conn) + if err != nil { + panic(err) + } + + err = authnpb.RegisterAuthNActivesHandler(ctx, gmux, conn) + if err != nil { + panic(err) + } + + err = authnpb.RegisterUnsecuredAdminAuthNHandler(ctx, gmux, conn) + if err != nil { + panic(err) + } + + RegisterRoutes(r, app, gmux) + + s := &http.Server{ + Addr: l.Addr().String(), + Handler: gateway.WrapRouter(gateway.FormWrapper(r), app), + } + + go func() { + <-ctx.Done() + if err := s.Shutdown(context.Background()); err != nil { + log.Errorf("Failed to shutdown http server: %v", err) + } + }() + + if err := s.Serve(l); err != http.ErrServerClosed { + return err + } + + return nil +} diff --git a/grpc/private/private_server.go b/grpc/private/private_server.go new file mode 100644 index 0000000000..7ca6068a8b --- /dev/null +++ b/grpc/private/private_server.go @@ -0,0 +1,118 @@ +package private + +import ( + "crypto/subtle" + "encoding/base64" + "net" + "strings" + + "google.golang.org/grpc/metadata" + + "github.com/keratin/authn-server/grpc/public" + + grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" + grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth" + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + log "github.com/sirupsen/logrus" + "golang.org/x/net/context" + grpc "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type basicAuthMatcher func(username, password string) bool + +// RunPrivateGRPC registers the private services and runs the gRPC server on the provided listener +func RunPrivateGRPC(ctx context.Context, app *api.App, l net.Listener) error { + srv := grpc.NewServer( + grpc_middleware.WithUnaryServerChain( + logInterceptor, + // the default authentication is none + grpc_auth.UnaryServerInterceptor(func(ctx context.Context) (context.Context, error) { + return ctx, nil + }), + ), + ) + + public.RegisterPublicGRPCMethods(srv, app) + + matcher := func(u string, p string) bool { + usernameMatch := subtle.ConstantTimeCompare([]byte(u), []byte(app.Config.AuthUsername)) + passwordMatch := subtle.ConstantTimeCompare([]byte(p), []byte(app.Config.AuthPassword)) + + return usernameMatch == 1 && passwordMatch == 1 + } + + authnpb.RegisterSecuredAdminAuthNServer(srv, securedServer{ + app: app, + matcher: matcher, + }) + + authnpb.RegisterUnsecuredAdminAuthNServer(srv, unsecuredServer{ + app: app, + }) + + if app.Actives != nil { + authnpb.RegisterAuthNActivesServer(srv, statsServer{ + app: app, + matcher: matcher, + }) + } + + go func() { + <-ctx.Done() + srv.GracefulStop() + }() + + if err := srv.Serve(l); err != nil { + log.Printf("serve error: %s", err) + return err + } + return nil +} + +func logInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + log.Infof("calling method: %s", info.FullMethod) + + res, err := handler(ctx, req) + if err != nil { + log.Errorf("error from method: %s", err) + } + return res, err +} + +func basicAuthCheck(ctx context.Context, matcher basicAuthMatcher) (context.Context, error) { + token, err := grpc_auth.AuthFromMD(ctx, "basic") + if err != nil { + header := metadata.Pairs("WWW-authenticate", `Basic realm="Private AuthN Realm"`) + grpc.SendHeader(ctx, header) + return ctx, grpc.Errorf(codes.Unauthenticated, "missing context metadata") + } + + c, err := base64.StdEncoding.DecodeString(token) + if err != nil { + header := metadata.Pairs("WWW-authenticate", `Basic realm="Private AuthN Realm"`) + grpc.SendHeader(ctx, header) + return ctx, status.Error(codes.Unauthenticated, `invalid base64 in header`) + } + + cs := string(c) + s := strings.IndexByte(cs, ':') + if s < 0 { + header := metadata.Pairs("WWW-authenticate", `Basic realm="Private AuthN Realm"`) + grpc.SendHeader(ctx, header) + return ctx, status.Error(codes.Unauthenticated, `invalid basic auth format`) + } + + user, password := cs[:s], cs[s+1:] + if !matcher(user, password) { + herr := grpc.SetHeader(ctx, metadata.Pairs("www-authenticate", `Basic realm="Private AuthN Realm"`)) + log.Printf("herr is: %s", herr) + // header := metadata.Pairs("WWW-authenticate", `Basic realm="Private AuthN Realm"`) + // grpc.SendHeader(ctx, header) + ctx = metadata.AppendToOutgoingContext(ctx, "WWW-Authenticate", `Basic realm="Private AuthN Realm"`) + return ctx, status.Error(codes.Unauthenticated, "invalid user or password") + } + return ctx, nil +} diff --git a/grpc/private/routing.go b/grpc/private/routing.go new file mode 100644 index 0000000000..4df4d8ace8 --- /dev/null +++ b/grpc/private/routing.go @@ -0,0 +1,108 @@ +package private + +import ( + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/keratin/authn-server/api" + "github.com/keratin/authn-server/grpc/public" + "github.com/keratin/authn-server/lib/route" + "github.com/prometheus/client_golang/prometheus/promhttp" +) + +/* +func router(app *api.App) http.Handler { + r := mux.NewRouter() + route.Attach(r, app.Config.MountedPath, meta.Routes(app)...) + route.Attach(r, app.Config.MountedPath, accounts.Routes(app)...) + route.Attach(r, app.Config.MountedPath, sessions.Routes(app)...) + route.Attach(r, app.Config.MountedPath, passwords.Routes(app)...) + route.Attach(r, app.Config.MountedPath, oauth.Routes(app)...) + + return wrapRouter(r, app) +} + +func publicRouter(app *api.App) http.Handler { + r := mux.NewRouter() + route.Attach(r, app.Config.MountedPath, meta.PublicRoutes(app)...) + route.Attach(r, app.Config.MountedPath, accounts.PublicRoutes(app)...) + route.Attach(r, app.Config.MountedPath, sessions.PublicRoutes(app)...) + route.Attach(r, app.Config.MountedPath, passwords.PublicRoutes(app)...) + route.Attach(r, app.Config.MountedPath, oauth.PublicRoutes(app)...) + + return wrapRouter(r, app) +} +*/ + +func RegisterRoutes(router *mux.Router, app *api.App, gmux *runtime.ServeMux) { + public.RegisterRoutes(router, app, gmux) + + route.Attach(router, app.Config.MountedPath, metaRoutes(app, gmux)...) + route.Attach(router, app.Config.MountedPath, accountRoutes(app, gmux)...) + +} + +func metaRoutes(app *api.App, gmux *runtime.ServeMux) []*route.HandledRoute { + authentication := route.BasicAuthSecurity(app.Config.AuthUsername, app.Config.AuthPassword, "Private AuthN Realm") + + routes := []*route.HandledRoute{} + + if app.Actives != nil { + routes = append(routes, + route.Get("/stats"). + SecuredWith(authentication). + Handle(gmux), + ) + } + + routes = append(routes, + route.Get("/jwks"). + SecuredWith(route.Unsecured()). + Handle(gmux), + route.Get("/configuration"). + SecuredWith(route.Unsecured()). + Handle(gmux), + route.Get("/metrics"). + SecuredWith(authentication). + Handle(promhttp.Handler()), + ) + + return routes +} + +func accountRoutes(app *api.App, gmux *runtime.ServeMux) []*route.HandledRoute { + authentication := route.BasicAuthSecurity(app.Config.AuthUsername, app.Config.AuthPassword, "Private AuthN Realm") + + routes := []*route.HandledRoute{} + + routes = append(routes, + route.Post("/accounts/import"). + SecuredWith(authentication). + Handle(gmux), + + route.Get("/accounts/{id:[0-9]+}"). + SecuredWith(authentication). + Handle(gmux), + + route.Patch("/accounts/{id:[0-9]+}"). + SecuredWith(authentication). + Handle(gmux), + + route.Patch("/accounts/{id:[0-9]+}/lock"). + SecuredWith(authentication). + Handle(gmux), + + route.Patch("/accounts/{id:[0-9]+}/unlock"). + SecuredWith(authentication). + Handle(gmux), + + route.Patch("/accounts/{id:[0-9]+}/expire_password"). + SecuredWith(authentication). + Handle(gmux), + + route.Delete("/accounts/{id:[0-9]+}"). + SecuredWith(authentication). + Handle(gmux), + ) + + return routes +} diff --git a/grpc/private/secured.go b/grpc/private/secured.go new file mode 100644 index 0000000000..d8dda9b266 --- /dev/null +++ b/grpc/private/secured.go @@ -0,0 +1,131 @@ +package private + +import ( + "github.com/keratin/authn-server/grpc/internal/errors" + "google.golang.org/grpc/codes" + + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + "github.com/keratin/authn-server/services" + "golang.org/x/net/context" +) + +type securedServer struct { + app *api.App + + // SECURITY: ensure that both ConstantTimeCompare operations are run, so that a + // timing attack may not verify a correct username without a correct password. + matcher func(username, password string) bool +} + +func (ss securedServer) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error) { + return basicAuthCheck(ctx, ss.matcher) +} + +func (ss securedServer) GetAccount(ctx context.Context, req *authnpb.GetAccountRequest) (*authnpb.GetAccountResponseEnvelope, error) { + + account, err := services.AccountGetter(ss.app.AccountStore, int(req.GetId())) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.NotFound).Err() + } + panic(err) + } + + return &authnpb.GetAccountResponseEnvelope{ + Result: &authnpb.GetAccountResponse{ + Id: int64(account.ID), + Username: account.Username, + Locked: account.Locked, + Deleted: account.DeletedAt != nil, + }, + }, nil +} + +func (ss securedServer) UpdateAccount(ctx context.Context, req *authnpb.UpdateAccountRequest) (*authnpb.UpdateAccountResponse, error) { + err := services.AccountUpdater(ss.app.AccountStore, ss.app.Config, int(req.GetId()), req.GetUsername()) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + if fe[0].Message == services.ErrNotFound { + return nil, errors.ToStatusErrorWithDetails(fe, codes.NotFound).Err() + } + + return nil, errors.ToStatusErrorWithDetails(fe, codes.FailedPrecondition).Err() + } + panic(err) + } + + return &authnpb.UpdateAccountResponse{}, nil +} + +func (ss securedServer) LockAccount(ctx context.Context, req *authnpb.LockAccountRequest) (*authnpb.LockAccountResponse, error) { + err := services.AccountLocker(ss.app.AccountStore, ss.app.RefreshTokenStore, int(req.GetId())) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.NotFound).Err() + } + + panic(err) + } + + return &authnpb.LockAccountResponse{}, nil +} + +func (ss securedServer) UnlockAcount(ctx context.Context, req *authnpb.UnlockAccountRequest) (*authnpb.UnlockAccountResponse, error) { + err := services.AccountUnlocker(ss.app.AccountStore, int(req.GetId())) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.NotFound).Err() + } + + panic(err) + } + + return &authnpb.UnlockAccountResponse{}, nil +} + +func (ss securedServer) ArchiveAccount(ctx context.Context, req *authnpb.ArchiveAccountRequest) (*authnpb.ArchiveAccountResponse, error) { + err := services.AccountArchiver(ss.app.AccountStore, ss.app.RefreshTokenStore, int(req.GetId())) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.FailedPrecondition).Err() + } + panic(err) + } + + return &authnpb.ArchiveAccountResponse{}, nil +} + +func (ss securedServer) ImportAccount(ctx context.Context, req *authnpb.ImportAccountRequst) (*authnpb.ImportAccountResponseEnvelope, error) { + account, err := services.AccountImporter( + ss.app.AccountStore, + ss.app.Config, + req.GetUsername(), + req.GetPassword(), + req.GetLocked(), + ) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.FailedPrecondition).Err() + } + panic(err) + } + + return &authnpb.ImportAccountResponseEnvelope{ + Result: &authnpb.ImportAccountResponse{ + Id: int64(account.ID), + }, + }, nil +} + +func (ss securedServer) ExpirePassword(ctx context.Context, req *authnpb.ExpirePasswordRequest) (*authnpb.ExpirePasswordResponse, error) { + err := services.PasswordExpirer(ss.app.AccountStore, ss.app.RefreshTokenStore, int(req.GetId())) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.NotFound).Err() + } + panic(err) + } + + return &authnpb.ExpirePasswordResponse{}, nil +} diff --git a/grpc/private/stats.go b/grpc/private/stats.go new file mode 100644 index 0000000000..92ee0f1d9b --- /dev/null +++ b/grpc/private/stats.go @@ -0,0 +1,52 @@ +package private + +import ( + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + "golang.org/x/net/context" +) + +type statsServer struct { + app *api.App + + // SECURITY: ensure that both ConstantTimeCompare operations are run, so that a + // timing attack may not verify a correct username without a correct password. + matcher func(username, password string) bool +} + +func (ss statsServer) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error) { + return basicAuthCheck(ctx, ss.matcher) +} + +func (ss statsServer) ServiceStats(ctx context.Context, req *authnpb.ServiceStatsRequest) (*authnpb.ServiceStatsResponse, error) { + daily, err := ss.app.Actives.ActivesByDay() + if err != nil { + panic(err) + } + + weekly, err := ss.app.Actives.ActivesByWeek() + if err != nil { + panic(err) + } + + monthly, err := ss.app.Actives.ActivesByMonth() + if err != nil { + panic(err) + } + + return &authnpb.ServiceStatsResponse{ + Actives: &authnpb.ServiceStatsResponseActiveStats{ + Daily: toMapStringInt64(daily), + Weekly: toMapStringInt64(weekly), + Monthly: toMapStringInt64(monthly), + }, + }, nil +} + +func toMapStringInt64(m map[string]int) map[string]int64 { + out := map[string]int64{} + for k, v := range m { + out[k] = int64(v) + } + return out +} diff --git a/grpc/private/unsecured.go b/grpc/private/unsecured.go new file mode 100644 index 0000000000..57d0acc8c3 --- /dev/null +++ b/grpc/private/unsecured.go @@ -0,0 +1,60 @@ +package private + +import ( + "encoding/json" + + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + "github.com/keratin/authn-server/lib/compat" + "golang.org/x/net/context" + jose "gopkg.in/square/go-jose.v2" +) + +type unsecuredServer struct { + app *api.App +} + +func (ss unsecuredServer) ServiceConfiguration(context.Context, *authnpb.ServiceConfigurationRequest) (*authnpb.Configuration, error) { + return &authnpb.Configuration{ + Issuer: ss.app.Config.AuthNURL.String(), + ResponseTypesSupported: []string{"id_token"}, + SubjectTypesSupported: []string{"public"}, + IdTokenSigningAlgValuesSupported: []string{"RS256"}, + ClaimsSupported: []string{"iss", "sub", "aud", "exp", "iat", "auth_time"}, + JwksUri: ss.app.Config.AuthNURL.String() + "/jwks", + }, nil +} + +func (ss unsecuredServer) JWKS(ctx context.Context, _ *authnpb.JWKSRequest) (*authnpb.JWKSResponse, error) { + keys := []*authnpb.Key{} + for _, key := range ss.app.KeyStore.Keys() { + keyID, err := compat.KeyID(key.Public()) + if err != nil { + ss.app.Reporter.ReportError(err) + } else { + // There are not proto definitions for jose.JSONWebKey and the marshalled version + // looks different than the struct, so the workaround is to build jose.JSONWebKey, + // marshal it , then unmarshal it into our message. + k, err := jose.JSONWebKey{ + Key: key.Public(), + Use: "sig", + Algorithm: "RS256", + KeyID: keyID, + }.MarshalJSON() + if err != nil { + ss.app.Reporter.ReportError(err) + continue + } + pkey := &authnpb.Key{} + err = json.Unmarshal(k, pkey) + if err != nil { + ss.app.Reporter.ReportError(err) + continue + } + keys = append(keys, pkey) + } + } + return &authnpb.JWKSResponse{ + Keys: keys, + }, nil +} diff --git a/grpc/public/gateway.go b/grpc/public/gateway.go new file mode 100644 index 0000000000..8b8d7ad819 --- /dev/null +++ b/grpc/public/gateway.go @@ -0,0 +1,62 @@ +package public + +import ( + "context" + "net" + "net/http" + + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + "github.com/keratin/authn-server/grpc/internal/gateway" + log "github.com/sirupsen/logrus" + "google.golang.org/grpc" +) + +func RegisterPublicGatewayHandlers(ctx context.Context, app *api.App, r *mux.Router, mux *runtime.ServeMux, conn *grpc.ClientConn) { + authnpb.RegisterPublicAuthNHandler(ctx, mux, conn) + if app.Config.EnableSignup { + authnpb.RegisterSignupServiceHandler(ctx, mux, conn) + } + + if app.Config.AppPasswordResetURL != nil { + authnpb.RegisterPasswordResetServiceHandler(ctx, mux, conn) + } + + if app.Config.AppPasswordlessTokenURL != nil { + authnpb.RegisterPasswordlessServiceHandler(ctx, mux, conn) + } +} + +func RunPublicGateway(ctx context.Context, app *api.App, r *mux.Router, conn *grpc.ClientConn, l net.Listener) error { + + gmux := runtime.NewServeMux( + runtime.WithForwardResponseOption(gateway.CookieSetter(app.Config)), // Cookies always have to go first + runtime.WithForwardResponseOption(gateway.StatusCodeMutator), + runtime.WithMarshalerOption("*", &runtime.JSONPb{ + OrigName: true, + EmitDefaults: true, + }), + ) + + RegisterRoutes(r, app, gmux) + RegisterPublicGatewayHandlers(ctx, app, r, gmux, conn) + s := &http.Server{ + Addr: l.Addr().String(), + Handler: gateway.WrapRouter(gateway.FormWrapper(r), app), + } + + go func() { + <-ctx.Done() + if err := s.Shutdown(context.Background()); err != nil { + log.Errorf("Failed to shutdown http server: %v", err) + } + }() + + if err := s.Serve(l); err != http.ErrServerClosed { + return err + } + + return nil +} diff --git a/grpc/public/password_reset.go b/grpc/public/password_reset.go new file mode 100644 index 0000000000..b2bfbb943f --- /dev/null +++ b/grpc/public/password_reset.go @@ -0,0 +1,32 @@ +package public + +import ( + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + "github.com/keratin/authn-server/services" + context "golang.org/x/net/context" +) + +var _ authnpb.PasswordResetServiceServer = passwordResetServer{} + +type passwordResetServer struct { + app *api.App +} + +func (s passwordResetServer) RequestPasswordReset(ctx context.Context, req *authnpb.PasswordResetRequest) (*authnpb.PasswordResetResponse, error) { + + account, err := s.app.AccountStore.FindByUsername(req.GetUsername()) + if err != nil { + panic(err) + } + + // run in the background so that a timing attack can't enumerate usernames + go func() { + err := services.PasswordResetSender(s.app.Config, account) + if err != nil { + s.app.Reporter.ReportError(err) + } + }() + + return &authnpb.PasswordResetResponse{}, nil +} diff --git a/grpc/public/passwordless.go b/grpc/public/passwordless.go new file mode 100644 index 0000000000..7d6368a84b --- /dev/null +++ b/grpc/public/passwordless.go @@ -0,0 +1,72 @@ +package public + +import ( + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + "github.com/keratin/authn-server/grpc/internal/errors" + "github.com/keratin/authn-server/services" + context "golang.org/x/net/context" + "google.golang.org/grpc/codes" +) + +type passwordlessServer struct { + app *api.App +} + +var _ authnpb.PasswordlessServiceServer = passwordlessServer{} + +func (s passwordlessServer) RequestPasswordlessLogin(ctx context.Context, req *authnpb.RequestPasswordlessLoginRequest) (*authnpb.RequestPasswordlessLoginResponse, error) { + + account, err := s.app.AccountStore.FindByUsername(req.GetUsername()) + if err != nil { + panic(err) + } + + // run in the background so that a timing attack can't enumerate usernames + go func() { + err := services.PasswordlessTokenSender(s.app.Config, account) + if err != nil { + s.app.Reporter.ReportError(err) + } + }() + + return &authnpb.RequestPasswordlessLoginResponse{}, nil +} + +func (s passwordlessServer) SubmitPasswordlessLogin(ctx context.Context, req *authnpb.SubmitPasswordlessLoginRequest) (*authnpb.SubmitPasswordlessLoginResponseEnvelope, error) { + + var err error + var accountID int + + accountID, err = services.PasswordlessTokenVerifier( + s.app.AccountStore, + s.app.Reporter, + s.app.Config, + req.GetToken(), + ) + + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.FailedPrecondition).Err() + } + panic(err) + } + + sessionToken, identityToken, err := services.SessionCreator( + s.app.AccountStore, s.app.RefreshTokenStore, s.app.KeyStore, s.app.Actives, s.app.Config, s.app.Reporter, + accountID, &s.app.Config.ApplicationDomains[0], getRefreshToken(ctx), + ) + if err != nil { + panic(err) + } + + // Return the signed session in a cookie + setSession(ctx, s.app.Config.SessionCookieName, sessionToken) + + // Return the signed identity token in the body + return &authnpb.SubmitPasswordlessLoginResponseEnvelope{ + Result: &authnpb.SubmitPasswordlessLoginResponse{ + IdToken: identityToken, + }, + }, nil +} diff --git a/grpc/public/public_server.go b/grpc/public/public_server.go new file mode 100644 index 0000000000..0fd783fdfc --- /dev/null +++ b/grpc/public/public_server.go @@ -0,0 +1,312 @@ +package public + +import ( + "fmt" + "net" + "sync" + + grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" + + log "github.com/sirupsen/logrus" + "golang.org/x/net/context" + "google.golang.org/genproto/googleapis/rpc/errdetails" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + + pkgerrors "github.com/pkg/errors" + + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + "github.com/keratin/authn-server/grpc/internal/errors" + "github.com/keratin/authn-server/models" + "github.com/keratin/authn-server/services" + "github.com/keratin/authn-server/tokens/sessions" +) + +// Compile-time check +var _ authnpb.PublicAuthNServer = publicServer{} + +type sessionKey int +type accountIDKey int + +type publicServer struct { + app *api.App +} + +func RunPublicGRPC(ctx context.Context, app *api.App, l net.Listener) error { + srv := grpc.NewServer( + grpc_middleware.WithUnaryServerChain( + logInterceptor, + sessionInterceptor(app), + ), + ) + + RegisterPublicGRPCMethods(srv, app) + + go func() { + <-ctx.Done() + srv.GracefulStop() + }() + + if err := srv.Serve(l); err != nil { + log.Printf("serve error: %s", err) + return err + } + return nil +} + +func RegisterPublicGRPCMethods(srv *grpc.Server, app *api.App) { + authnpb.RegisterPublicAuthNServer(srv, publicServer{ + app: app, + }) + + if app.Config.EnableSignup { + authnpb.RegisterSignupServiceServer(srv, signupServiceServer{ + app: app, + }) + } + + if app.Config.AppPasswordResetURL != nil { + authnpb.RegisterPasswordResetServiceServer(srv, passwordResetServer{ + app: app, + }) + } + + if app.Config.AppPasswordlessTokenURL != nil { + authnpb.RegisterPasswordlessServiceServer(srv, passwordlessServer{ + app: app, + }) + } +} + +func sessionInterceptor(app *api.App) grpc.UnaryServerInterceptor { + return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + var session *sessions.Claims + var parseOnce sync.Once + parse := func() *sessions.Claims { + parseOnce.Do(func() { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return + } + cookies := md.Get(app.Config.SessionCookieName) + if len(cookies) == 0 { + return + } + var err error + session, err = sessions.Parse(cookies[0], app.Config) + if err != nil { + app.Reporter.ReportError(pkgerrors.Wrap(err, "Parse")) + return + } + }) + return session + } + + var accountID int + var lookupOnce sync.Once + lookup := func() int { + lookupOnce.Do(func() { + var err error + session := parse() + if session == nil { + return + } + + accountID, err = app.RefreshTokenStore.Find(models.RefreshToken(session.Subject)) + if err != nil { + app.Reporter.ReportError(pkgerrors.Wrap(err, "Find")) + } + }) + return accountID + } + ctx = context.WithValue(ctx, sessionKey(0), parse) + ctx = context.WithValue(ctx, accountIDKey(0), lookup) + return handler(ctx, req) + } +} + +func logInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + log.Infof("calling method: %s", info.FullMethod) + + res, err := handler(ctx, req) + if err != nil { + log.Errorf("error from method: %s", err) + log.Errorf("error type: %T", err) + } + return res, err +} + +func (s publicServer) Login(ctx context.Context, req *authnpb.LoginRequest) (*authnpb.LoginResponseEnvelope, error) { + account, err := services.CredentialsVerifier( + s.app.AccountStore, + s.app.Config, + req.GetUsername(), + req.GetPassword(), + ) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + br := &errdetails.BadRequest{} + for _, fe := range fe { + br.FieldViolations = append(br.FieldViolations, &errdetails.BadRequest_FieldViolation{ + Field: fe.Field, + Description: fe.Message, + }) + } + statusError := status.New(codes.FailedPrecondition, fe.Error()) + statusEr, e := statusError.WithDetails(br) + if e != nil { + panic(fmt.Sprintf("Unexpected error attaching metadata: %v", e)) + } + return nil, statusEr.Err() + } + panic(err) + } + + sessionToken, identityToken, err := services.SessionCreator( + s.app.AccountStore, s.app.RefreshTokenStore, s.app.KeyStore, s.app.Actives, s.app.Config, s.app.Reporter, + account.ID, &s.app.Config.ApplicationDomains[0], getRefreshToken(ctx), + ) + if err != nil { + panic(err) + } + + // Return the signed session in a metadata + setSession(ctx, s.app.Config.SessionCookieName, sessionToken) + + // Return the signed identity token in the body + return &authnpb.LoginResponseEnvelope{ + Result: &authnpb.LoginResponse{ + IdToken: identityToken, + }, + }, nil +} + +func (s publicServer) RefreshSession(ctx context.Context, _ *authnpb.RefreshSessionRequest) (*authnpb.RefreshSessionResponseEnvelope, error) { + + // check for valid session with live token + accountID := getSessionAccountID(ctx) + if accountID == 0 { + return nil, status.Error(codes.Unauthenticated, "account not found") + } + + identityToken, err := services.SessionRefresher( + s.app.RefreshTokenStore, s.app.KeyStore, s.app.Actives, s.app.Config, s.app.Reporter, + getSession(ctx), accountID, &s.app.Config.ApplicationDomains[0], + ) + if err != nil { + panic(pkgerrors.Wrap(err, "IdentityForSession")) + } + + return &authnpb.RefreshSessionResponseEnvelope{ + Result: &authnpb.RefreshSessionResponse{ + IdToken: identityToken, + }, + }, nil +} + +func (s publicServer) Logout(ctx context.Context, _ *authnpb.LogoutRequest) (*authnpb.LogoutResponse, error) { + + err := services.SessionEnder(s.app.RefreshTokenStore, getRefreshToken(ctx)) + if err != nil { + s.app.Reporter.ReportError(err) + } + + setSession(ctx, s.app.Config.SessionCookieName, "") + + return &authnpb.LogoutResponse{}, nil +} + +func (s publicServer) ChangePassword(ctx context.Context, req *authnpb.ChangePasswordRequest) (*authnpb.ChangePasswordResponseEnvelope, error) { + + var err error + var accountID int + if req.GetToken() != "" { + accountID, err = services.PasswordResetter( + s.app.AccountStore, + s.app.Reporter, + s.app.Config, + req.GetToken(), + req.GetPassword(), + ) + } else { + accountID = getSessionAccountID(ctx) + if accountID == 0 { + return nil, status.Error(codes.Unauthenticated, "account") + } + err = services.PasswordChanger( + s.app.AccountStore, + s.app.Reporter, + s.app.Config, + accountID, + req.GetCurrentPassword(), + req.GetPassword(), + ) + } + + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.FailedPrecondition).Err() + } + panic(err) + } + + sessionToken, identityToken, err := services.SessionCreator( + s.app.AccountStore, s.app.RefreshTokenStore, s.app.KeyStore, s.app.Actives, s.app.Config, s.app.Reporter, + accountID, &s.app.Config.ApplicationDomains[0], getRefreshToken(ctx), + ) + if err != nil { + panic(err) + } + + // Return the signed session in a cookie + setSession(ctx, s.app.Config.SessionCookieName, sessionToken) + + // Return the signed identity token in the body + return &authnpb.ChangePasswordResponseEnvelope{ + Result: &authnpb.ChangePasswordResponse{ + IdToken: identityToken, + }, + }, nil +} + +func (s publicServer) HealthCheck(context.Context, *authnpb.HealthCheckRequest) (*authnpb.HealthCheckResponse, error) { + return &authnpb.HealthCheckResponse{ + Http: true, + Redis: s.app.RedisCheck(), + Db: s.app.DbCheck(), + }, nil +} + +func getRefreshToken(ctx context.Context) *models.RefreshToken { + claims := getSession(ctx) + if claims != nil { + token := models.RefreshToken(claims.Subject) + return &token + } + return nil +} + +func getSession(ctx context.Context) *sessions.Claims { + fn, ok := ctx.Value(sessionKey(0)).(func() *sessions.Claims) + if ok { + return fn() + } + return nil +} + +func setSession(ctx context.Context, cookieName string, val string) { + // create and send header + header := metadata.Pairs(cookieName, val) + grpc.SendHeader(ctx, header) +} + +func getSessionAccountID(ctx context.Context) int { + fn, ok := ctx.Value(accountIDKey(0)).(func() int) + if ok { + return fn() + } + return 0 +} diff --git a/grpc/public/routing.go b/grpc/public/routing.go new file mode 100644 index 0000000000..53cf91bccb --- /dev/null +++ b/grpc/public/routing.go @@ -0,0 +1,120 @@ +package public + +import ( + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/keratin/authn-server/api" + "github.com/keratin/authn-server/api/oauth" + "github.com/keratin/authn-server/lib/route" +) + +/* +func router(app *api.App) http.Handler { + r := mux.NewRouter() + route.Attach(r, app.Config.MountedPath, meta.Routes(app)...) + route.Attach(r, app.Config.MountedPath, accounts.Routes(app)...) + route.Attach(r, app.Config.MountedPath, sessions.Routes(app)...) + route.Attach(r, app.Config.MountedPath, passwords.Routes(app)...) + route.Attach(r, app.Config.MountedPath, oauth.Routes(app)...) + + return wrapRouter(r, app) +} + +func publicRouter(app *api.App) http.Handler { + r := mux.NewRouter() + route.Attach(r, app.Config.MountedPath, meta.PublicRoutes(app)...) + route.Attach(r, app.Config.MountedPath, accounts.PublicRoutes(app)...) + route.Attach(r, app.Config.MountedPath, sessions.PublicRoutes(app)...) + route.Attach(r, app.Config.MountedPath, passwords.PublicRoutes(app)...) + route.Attach(r, app.Config.MountedPath, oauth.PublicRoutes(app)...) + + return wrapRouter(r, app) +} +*/ + +func RegisterRoutes(router *mux.Router, app *api.App, gmux *runtime.ServeMux) { + route.Attach(router, app.Config.MountedPath, accountRoutes(app, gmux)...) + route.Attach(router, app.Config.MountedPath, metaRoutes(app, gmux)...) + route.Attach(router, app.Config.MountedPath, sessionsRoutes(app, gmux)...) + route.Attach(router, app.Config.MountedPath, passwordsRoutes(app, gmux)...) + route.Attach(router, app.Config.MountedPath, oauth.PublicRoutes(app)...) +} + +func metaRoutes(app *api.App, gmux *runtime.ServeMux) []*route.HandledRoute { + return []*route.HandledRoute{ + route.Get("/health"). + SecuredWith(route.Unsecured()). + Handle(gmux), + } +} + +func accountRoutes(app *api.App, gmux *runtime.ServeMux) []*route.HandledRoute { + originSecurity := route.OriginSecurity(app.Config.ApplicationDomains) + + routes := []*route.HandledRoute{} + + if app.Config.EnableSignup { + routes = append(routes, + route.Post("/accounts"). + SecuredWith(originSecurity). + Handle(gmux), + route.Get("/accounts/available"). + SecuredWith(originSecurity). + Handle(gmux), + ) + } + + return routes +} + +func sessionsRoutes(app *api.App, gmux *runtime.ServeMux) []*route.HandledRoute { + originSecurity := route.OriginSecurity(app.Config.ApplicationDomains) + + routes := []*route.HandledRoute{ + route.Post("/session"). + SecuredWith(originSecurity). + Handle(gmux), + + route.Delete("/session"). + SecuredWith(originSecurity). + Handle(gmux), + + route.Get("/session/refresh"). + SecuredWith(originSecurity). + Handle(gmux), + } + + if app.Config.AppPasswordlessTokenURL != nil { + routes = append(routes, + route.Get("/session/token"). + SecuredWith(originSecurity). + Handle(gmux), + + route.Post("/session/token"). + SecuredWith(originSecurity). + Handle(gmux), + ) + } + + return routes +} + +func passwordsRoutes(app *api.App, gmux *runtime.ServeMux) []*route.HandledRoute { + originSecurity := route.OriginSecurity(app.Config.ApplicationDomains) + + routes := []*route.HandledRoute{ + route.Post("/password"). + SecuredWith(originSecurity). + Handle(gmux), + } + + if app.Config.AppPasswordResetURL != nil { + routes = append(routes, + route.Get("/password/reset"). + SecuredWith(originSecurity). + Handle(gmux), + ) + } + + return routes +} diff --git a/grpc/public/signup.go b/grpc/public/signup.go new file mode 100644 index 0000000000..de023cb0f1 --- /dev/null +++ b/grpc/public/signup.go @@ -0,0 +1,76 @@ +package public + +import ( + "fmt" + + "github.com/keratin/authn-server/api" + authnpb "github.com/keratin/authn-server/grpc" + "github.com/keratin/authn-server/grpc/internal/errors" + "github.com/keratin/authn-server/services" + context "golang.org/x/net/context" + "google.golang.org/genproto/googleapis/rpc/errdetails" + grpc "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +type signupServiceServer struct { + app *api.App +} + +var _ authnpb.SignupServiceServer = signupServiceServer{} + +func (s signupServiceServer) Signup(ctx context.Context, req *authnpb.SignupRequest) (*authnpb.SignupResponseEnvelope, error) { + + account, err := services.AccountCreator(s.app.AccountStore, s.app.Config, req.GetUsername(), req.GetPassword()) + if err != nil { + if fe, ok := err.(services.FieldErrors); ok { + return nil, errors.ToStatusErrorWithDetails(fe, codes.FailedPrecondition).Err() + } + panic(err) + } + + sessionToken, identityToken, err := services.SessionCreator( + s.app.AccountStore, s.app.RefreshTokenStore, s.app.KeyStore, s.app.Actives, s.app.Config, s.app.Reporter, + account.ID, &s.app.Config.ApplicationDomains[0], getRefreshToken(ctx), + ) + if err != nil { + panic(err) + } + + header := metadata.Pairs(s.app.Config.SessionCookieName, sessionToken) + grpc.SendHeader(ctx, header) + + return &authnpb.SignupResponseEnvelope{ + Result: &authnpb.SignupResponse{ + IdToken: identityToken, + }, + }, nil +} + +func (s signupServiceServer) IsUsernameAvailable(ctx context.Context, req *authnpb.IsUsernameAvailableRequest) (*authnpb.IsUsernameAvailableResponseEnvelope, error) { + account, err := s.app.AccountStore.FindByUsername(req.GetUsername()) + if err != nil { + panic(err) + } + + if account == nil { + return &authnpb.IsUsernameAvailableResponseEnvelope{ + Result: true, + }, nil + } + + br := &errdetails.BadRequest{} + br.FieldViolations = append(br.FieldViolations, &errdetails.BadRequest_FieldViolation{ + Field: "username", + Description: services.ErrTaken, + }) + + statusError := status.New(codes.FailedPrecondition, services.FieldErrors{{Field: "username", Message: services.ErrTaken}}.Error()) + statusEr, e := statusError.WithDetails(br) + if e != nil { + panic(fmt.Sprintf("Unexpected error attaching metadata: %v", e)) + } + return nil, statusEr.Err() +} diff --git a/grpc/server.go b/grpc/server.go deleted file mode 100644 index 02ddbb6f15..0000000000 --- a/grpc/server.go +++ /dev/null @@ -1,149 +0,0 @@ -package grpc - -import ( - "net" - - "github.com/sirupsen/logrus" - - "github.com/gogo/protobuf/types" - - "golang.org/x/net/context" - "google.golang.org/grpc" - - "google.golang.org/grpc/credentials" -) - -// Compile-time check -var _ AuthNServer = Server{} - -type Server struct { - lis net.Listener - creds credentials.TransportCredentials -} - -// NewServer returns a new gRPC server -func NewServer(lis net.Listener, creds credentials.TransportCredentials) Server { - return Server{ - lis: lis, - creds: creds, - } -} - -func (s Server) RunGRPC(ctx context.Context) { - - srv := grpc.NewServer( - grpc.Creds(s.creds), - grpc.UnaryInterceptor(logInterceptor), - ) - - RegisterAuthNServer(srv, s) - - logrus.Infof("gRPC Listening on %s", s.lis.Addr().String()) - - go func() { - if err := srv.Serve(s.lis); err != nil { - logrus.Printf("serve error: %s", err) - return - } - }() - <-ctx.Done() - srv.Stop() -} - -func logInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { - logrus.Infof("calling method: %s", info.FullMethod) - - res, err := handler(ctx, req) - if err != nil { - logrus.Errorf("error from method: %s", err) - } - return res, err -} - -func (s Server) Signup(ctx context.Context, req *SignupRequest) (*SignupResponseEnvelope, error) { - return nil, nil -} - -func (s Server) GetAccount(ctx context.Context, req *GetAccountRequest) (*GetAccountResponseEnvelope, error) { - return nil, nil -} - -func (s Server) UpdateAccount(ctx context.Context, req *UpdateAccountRequest) (*types.Empty, error) { - return nil, nil -} - -func (s Server) IsUsernameAvailable(ctx context.Context, req *IsUsernameAvailableRequest) (*IsUsernameAvailableResponseEnvelope, error) { - return nil, nil -} - -func (s Server) LockAccount(ctx context.Context, req *LockAccountRequest) (*types.Empty, error) { - return nil, nil -} - -func (s Server) UnlockAcount(ctx context.Context, req *UnlockAccountRequest) (*types.Empty, error) { - return nil, nil -} - -func (s Server) ArchiveAccount(ctx context.Context, req *ArchiveAccountRequest) (*types.Empty, error) { - return nil, nil -} - -func (s Server) ImportAccount(ctx context.Context, req *ImportAccountRequst) (*ImportAccountResponseEnvelope, error) { - return nil, nil -} - -// Session Management -func (s Server) Login(ctx context.Context, req *LoginRequest) (*SignupResponse, error) { - return nil, nil -} - -func (s Server) RefreshSession(ctx context.Context, req *types.Empty) (*SignupResponse, error) { - return nil, nil -} - -func (s Server) Logout(ctx context.Context, req *types.Empty) (*types.Empty, error) { - return nil, nil -} - -// Password Management -func (s Server) RequestPasswordReset(ctx context.Context, req *PasswordResetRequest) (*types.Empty, error) { - return nil, nil -} - -func (s Server) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*SignupResponse, error) { - return nil, nil -} - -func (s Server) ExpirePassword(ctx context.Context, req *ExpirePasswordRequest) (*types.Empty, error) { - return nil, nil -} - -// OAuth -func (s Server) BeginOAuth(ctx context.Context, req *BeginOAuthRequest) (*BeginOAuthResponse, error) { - return nil, nil -} - -func (s Server) OAuthReturn(ctx context.Context, req *OAuthReturnRequest) (*OAuthReturnResponse, error) { - return nil, nil -} - -// Config -func (s Server) ServiceConfiguration(ctx context.Context, req *types.Empty) (*Configuration, error) { - return nil, nil -} - -func (s Server) JWKS(ctx context.Context, req *types.Empty) (*JWKSResponse, error) { - return nil, nil -} - -func (s Server) ServiceStats(ctx context.Context, req *types.Empty) (*ServiceStatsResponse, error) { - return nil, nil -} - -func (s Server) ServerStats(ctx context.Context, req *types.Empty) (*types.Empty, error) { - return nil, nil -} - -func (s Server) HealthCheck(ctx context.Context, req *types.Empty) (*HealthCheckResponse, error) { - return nil, nil -} diff --git a/grpc/server/server.go b/grpc/server/server.go new file mode 100644 index 0000000000..5917572026 --- /dev/null +++ b/grpc/server/server.go @@ -0,0 +1,68 @@ +package server + +import ( + "context" + + "github.com/grpc-ecosystem/grpc-gateway/runtime" + log "github.com/sirupsen/logrus" + + "net" + + "github.com/gorilla/mux" + "github.com/keratin/authn-server/api" + "github.com/keratin/authn-server/grpc/internal/errors" + "github.com/keratin/authn-server/grpc/private" + "github.com/keratin/authn-server/grpc/public" + "golang.org/x/sync/errgroup" + "google.golang.org/grpc" +) + +func init() { + runtime.HTTPError = errors.CustomHTTPError +} + +// RunPrivateService starts a gRPC server for the private API and accompanying gRPC-Gateway server +func RunPrivateService(ctx context.Context, app *api.App, grpcListener net.Listener, httpListener net.Listener) error { + + privateRouter := mux.NewRouter() + + g, ctx := errgroup.WithContext(ctx) + + g.Go(func() error { + return private.RunPrivateGRPC(ctx, app, grpcListener) + }) + + privClientConn, err := grpc.DialContext(context.TODO(), grpcListener.Addr().String(), grpc.WithInsecure()) + if err != nil { + log.Fatal(err) + } + + g.Go(func() error { + return private.RunPrivateGateway(ctx, app, privateRouter, privClientConn, httpListener) + }) + + return g.Wait() +} + +// RunPublicService starts a gRPC server for the public API and accompanying gRPC-Gateway server +func RunPublicService(ctx context.Context, app *api.App, grpcListener net.Listener, httpListener net.Listener) error { + + publicRouter := mux.NewRouter() + + g, ctx := errgroup.WithContext(ctx) + + g.Go(func() error { + return public.RunPublicGRPC(ctx, app, grpcListener) + }) + + clientConn, err := grpc.DialContext(ctx, grpcListener.Addr().String(), grpc.WithInsecure()) + if err != nil { + log.Fatal(err) + } + + g.Go(func() error { + return public.RunPublicGateway(ctx, app, publicRouter, clientConn, httpListener) + }) + + return g.Wait() +}