MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / Identifier

Method Identifier

internal/pluginhost/adapters.go:1269–1287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1267}
1268
1269func (a *accessAdapter) Identifier() (identifier string) {
1270 if a == nil || a.provider == nil {
1271 return ""
1272 }
1273 defer func() {
1274 if recovered := recover(); recovered != nil {
1275 if a.host != nil {
1276 a.host.fusePlugin(a.pluginID, "FrontendAuthProvider.Identifier", recovered)
1277 }
1278 identifier = ""
1279 }
1280 }()
1281 pluginID := strings.TrimSpace(a.pluginID)
1282 providerID := strings.TrimSpace(a.provider.Identifier())
1283 if pluginID == "" || providerID == "" {
1284 return ""
1285 }
1286 return "plugin:" + pluginID + ":" + providerID
1287}
1288
1289func (a *accessAdapter) Authenticate(ctx context.Context, r *http.Request) (result *sdkaccess.Result, authErr *sdkaccess.AuthError) {
1290 if a == nil || a.provider == nil || a.host.isPluginFused(a.pluginID) || !a.host.pluginIdentityCurrent(a.pluginID, a.path, a.version) {

Callers 2

AuthenticateMethod · 0.95

Calls 2

fusePluginMethod · 0.80
IdentifierMethod · 0.65

Tested by

no test coverage detected