MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / allowsSessionFor

Method allowsSessionFor

lib/models/solid-host.mjs:31–41  ·  view source on GitHub ↗
(userId, origin, trustedOrigins)

Source from the content-addressed store, hash-verified

29 }
30
31 allowsSessionFor (userId, origin, trustedOrigins) {
32 if (!userId || !origin) return true
33 const originHost = getHostName(origin)
34 const serverHost = getHostName(this.serverUri)
35 if (originHost === serverHost) return true
36 if (originHost.endsWith('.' + serverHost)) return true
37 const userHost = getHostName(userId)
38 if (originHost === userHost) return true
39 if (trustedOrigins.includes(origin)) return true
40 return false
41 }
42
43 get authEndpoint () {
44 const authUrl = new URL('/authorize', this.serverUri)

Callers 2

initWebIdFunction · 0.80

Calls 1

getHostNameFunction · 0.85

Tested by

no test coverage detected