Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Implement auth code flow for the custom endpoint

Aperta
#244 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
azure, csharp

Direzione di ricerca

Inizia dal codice personalizzato di MyCustomDfMonEndpoint nell’issue e segui DfmServeStaticsFunction, concentrandoti sul motivo per cui l’auth code viene riscattato nuovamente quando il metodo viene eseguito. Definisci come l’autenticazione debba applicarsi solo a questo endpoint e come verrà verificato il completamento senza easy auth o il riscatto ripetuto del codice.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

question

Hi,

I implemented a custom endpoint for the durable functions monitor as explained below

`namespace DurableFunctionsMonitor.DotNetIsolated
{
public class MyCustomDfMonEndpoint: ServeStatics
{
public MyCustomDfMonEndpoint(DfmSettings dfmSettings, DfmExtensionPoints extensionPoints, ILoggerFactory loggerFactory) :
base(dfmSettings, extensionPoints, loggerFactory)
{
}

    [Function(nameof(MyCustomDfMonEndpoint))]
    public Task<HttpResponseData> ServeDfMonStatics(
        [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "/{p1?}/{p2?}/{p3?}")] HttpRequestData req,
        string p1,
        string p2,
        string p3
    )
    {
        return this.DfmServeStaticsFunction(req, p1, p2, p3);
    }
}

}`

I am trying to set up authentication as explained in https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow for this specific endpoint. For some reasons, we can't set up a dedicated function app just for the durable functions monitor and also in our main function app , we don't want to set up easy auth authentication .

What we are trying to achieve is get a auth code and access token via a app registration and then authenticate this specific custom end point.

What I noticed is , when the statement return this.DfmServeStaticsFunction(req, p1, p2, p3); is executed , the http triggered function is called again. This results in the auth code used again to get the token and the exception is generated that the auth code has already been redeemed for the access token

Is there any workaround to provide authentication just for this custom end point ? Or anyway to implement auth code flow for this end point in the function app ?

Thanks

Lingua principale
TypeScript
Stelle
290
Fork
46
Merge medio
6m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/DurableFunctionsMonitor

Tutte le issue di microsoft/DurableFunctionsMonitor

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.