Clancey / simple_auth

The Simplest way to Authenticate in Flutter
MIT License
352 stars 108 forks source link

fix(simple_auth_flutter_example): parameter order #117

Closed CoreyCole closed 5 years ago

CoreyCole commented 5 years ago

I believe the azureAdTestApi.dart example is wrong/out-of-date. It orders the params:

"AzureAdTestApi","resource","client_id","redirecturl"

When it should be (defined here):

name, this.clientId, this.resource, this.redirectUrl
CoreyCole commented 5 years ago

Kind of an aside, but what is the design thinking behind only some of the parameters being named? Naming all the parameters would have made this error more obvious:

@AzureADApiDeclaration(
  name: "AzureAdTestApi",
  clientId: "resource",
  resource: "client_id",
  redirectUrl: "redirecturl",
  azureTennant: "azureTennant",
  clientSecret: "client_secret"
)
abstract class AzureADDefinition {

}

The error is easier to see

clientId: "resource",
resource: "client_id",
Clancey commented 5 years ago

Thanks!