ing
This commit is contained in:
parent
33dfa4bdcc
commit
9f76eace03
|
@ -1,9 +1,10 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
|
||||
occe "git.loafle.net/overflow/commons-go/config/external"
|
||||
ogrs "git.loafle.net/overflow/gateway_rest/server"
|
||||
"crypto/rsa"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
ccf "git.loafle.net/commons/cors-go/fasthttp"
|
||||
cs "git.loafle.net/commons/server-go"
|
||||
oge "git.loafle.net/overflow/gateway/external"
|
||||
ogrs "git.loafle.net/overflow/gateway_rest/server"
|
||||
"git.loafle.net/overflow/member_gateway_rest/config"
|
||||
"github.com/valyala/fasthttp"
|
||||
ccf "git.loafle.net/commons/cors-go/fasthttp"
|
||||
)
|
||||
|
||||
type ServerHandler interface {
|
||||
|
@ -16,7 +16,7 @@ type ServerHandler interface {
|
|||
type ServerHandlers struct {
|
||||
ogrs.ServerHandlers
|
||||
|
||||
Config *config.Config
|
||||
Config *config.Config
|
||||
corsHandler ccf.Cors
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ func NewServer(_config *config.Config) *cswf.Server {
|
|||
cdr.RegisterResource("VerifyKey", _config.VerifyKey)
|
||||
cdr.RegisterResource("SignKey", _config.SignKey)
|
||||
|
||||
|
||||
services, err := cdr.GetInstancesByAnnotationType(oca.RESTServiceAnnotationType)
|
||||
if nil != err {
|
||||
logging.Logger().Panic(err)
|
||||
|
|
|
@ -16,29 +16,29 @@ import (
|
|||
"git.loafle.net/overflow/gateway/external/grpc"
|
||||
"github.com/valyala/fasthttp"
|
||||
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
)
|
||||
|
||||
var MemberServiceType = reflect.TypeOf((*MemberService)(nil))
|
||||
|
||||
func init() {
|
||||
func init() {
|
||||
cdr.RegisterType(MemberServiceType)
|
||||
}
|
||||
|
||||
type MemberService struct {
|
||||
cda.TypeAnnotation `annotation:"@overflow:RESTService()"`
|
||||
|
||||
VerifyKey *rsa.PublicKey `annotation:"@Resource(name='VerifyKey')"`
|
||||
SignKey *rsa.PrivateKey `annotation:"@Resource(name='SignKey')"`
|
||||
VerifyKey *rsa.PublicKey `annotation:"@Resource(name='VerifyKey')"`
|
||||
SignKey *rsa.PrivateKey `annotation:"@Resource(name='SignKey')"`
|
||||
|
||||
_Signin cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signin', params='[signinID, signinPW]')"`
|
||||
_SigninByCookie cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signin_cookie', params='[authToken]')"`
|
||||
_Signup cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signup', params='[member, pw]')"`
|
||||
_EmailConfirm cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='GET', entry='/account/email_confirm', params='[token]')"`
|
||||
_ForgotPassword cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/forgot_password', params='[signinID]')"`
|
||||
_ResetPwConfirm cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/reset_pw_confirm', params='[pw, key]')"`
|
||||
_Signin cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signin', params='[signinID, signinPW]')"`
|
||||
_SigninByCookie cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signin_cookie', params='[authToken]')"`
|
||||
_Signup cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signup', params='[member, pw]')"`
|
||||
_EmailConfirm cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='GET', entry='/account/email_confirm', params='[token]')"`
|
||||
_ForgotPassword cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/forgot_password', params='[signinID]')"`
|
||||
_ResetPwConfirm cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/reset_pw_confirm', params='[pw, key]')"`
|
||||
}
|
||||
|
||||
func (ms *MemberService) EmailConfirm(servletCtx server.ServletCtx, ctx *fasthttp.RequestCtx, token string) error {
|
||||
|
@ -180,4 +180,4 @@ func (ms *MemberService) ResetPwConfirm(servletCtx server.ServletCtx, ctx *fasth
|
|||
ctx.SetBody([]byte(r))
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user