Commit 9270a83a authored by Ivar Derksen's avatar Ivar Derksen
Browse files

Refactor: CallbackUrl -> CallbackURL

parent d6e62a7b
......@@ -87,7 +87,7 @@ var IrmaServerConfiguration = &requestorserver.Configuration{
IssuerPrivateKeysPath: filepath.Join(testdata, "privatekeys"),
},
DisableRequestorAuthentication: true,
Port: 48682,
Port: 48682,
}
var JwtServerConfiguration = &requestorserver.Configuration{
......@@ -97,7 +97,7 @@ var JwtServerConfiguration = &requestorserver.Configuration{
SchemesPath: filepath.Join(testdata, "irma_configuration"),
IssuerPrivateKeysPath: filepath.Join(testdata, "privatekeys"),
},
Port: 48682,
Port: 48682,
DisableRequestorAuthentication: false,
MaxRequestAge: 3,
Permissions: requestorserver.Permissions{
......@@ -122,7 +122,7 @@ var JwtServerConfiguration = &requestorserver.Configuration{
StaticSessions: map[string]interface{}{
"staticsession": irma.ServiceProviderRequest{
RequestorBaseRequest: irma.RequestorBaseRequest{
CallbackUrl: "http://localhost:48685",
CallbackURL: "http://localhost:48685",
},
Request: &irma.DisclosureRequest{
BaseRequest: irma.BaseRequest{LDContext: irma.LDContextDisclosureRequest},
......
......@@ -108,7 +108,7 @@ type ServerJwt struct {
type RequestorBaseRequest struct {
ResultJwtValidity int `json:"validity,omitempty"` // Validity of session result JWT in seconds
ClientTimeout int `json:"timeout,omitempty"` // Wait this many seconds for the IRMA app to connect before the session times out
CallbackUrl string `json:"callbackUrl,omitempty"` // URL to post session result to
CallbackURL string `json:"callbackUrl,omitempty"` // URL to post session result to
}
// RequestorRequest is the message with which requestors start an IRMA session. It contains a
......
......@@ -271,7 +271,7 @@ func (conf *Configuration) initialize() error {
if action != irma.ActionDisclosing && action != irma.ActionSigning {
return errors.Errorf("static session %s must be either a disclosing or signing session", name)
}
if rrequest.Base().CallbackUrl == "" {
if rrequest.Base().CallbackURL == "" {
return errors.Errorf("static session %s has no callback URL", name)
}
conf.staticSessions[name] = rrequest
......
......@@ -340,7 +340,7 @@ func (s *Server) handleCreate(w http.ResponseWriter, r *http.Request) {
return
}
}
if rrequest.Base().CallbackUrl != "" && s.conf.jwtPrivateKey == nil {
if rrequest.Base().CallbackURL != "" && s.conf.jwtPrivateKey == nil {
s.conf.Logger.WithFields(logrus.Fields{"requestor": requestor}).Warn("Requestor provided callbackUrl but no JWT private key is installed")
server.WriteError(w, server.ErrorUnsupported, "")
return
......@@ -547,7 +547,7 @@ func (s *Server) resultJwt(sessionresult *server.SessionResult) (string, error)
}
func (s *Server) doResultCallback(result *server.SessionResult) {
callbackUrl := s.irmaserv.GetRequest(result.Token).Base().CallbackUrl
callbackUrl := s.irmaserv.GetRequest(result.Token).Base().CallbackURL
if callbackUrl == "" {
return
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment