Skip to content

Commit

Permalink
chore: pass webfinger endpoint from token check
Browse files Browse the repository at this point in the history
Signed-off-by: Firas Qutishat <firas.qutishat@securekey.com>
  • Loading branch information
fqutishat committed Apr 6, 2022
1 parent f578b6b commit b0d9785
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/vct/startcmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ const (
defaultSyncTimeout = "3"
healthCheckEndpoint = "/healthcheck"
addVCEndpoint = "/add-vc"
webFingerEndpoint = "/.well-known/webfinger"
)

type (
Expand Down Expand Up @@ -1116,7 +1117,7 @@ func createJSONLDDocumentLoader(ldStore *ldStoreProvider, httpClient *http.Clien
}

func validateAuthorizationBearerToken(w http.ResponseWriter, r *http.Request, readToken, writeToken string) bool {
if r.RequestURI == healthCheckEndpoint {
if r.RequestURI == healthCheckEndpoint || strings.Contains(r.RequestURI, webFingerEndpoint) {
return true
}

Expand Down

0 comments on commit b0d9785

Please sign in to comment.