← Home ← Back to /g/

Thread 105950896

21 posts 6 images /g/
Anonymous No.105950896 [Report] >>105951287 >>105951458 >>105951551 >>105951725 >>105955249
>[Authorize]
>literally nothing happens
is this thing broken or something?
Anonymous No.105951287 [Report]
>>105950896 (OP)
>microshit
>asking if it's broken
No, no way it is. How could it be? You ever seen any vulnerabilities in Microsoft Corporation 's products?
<https://www.microsoft.com/en-us/security/blog/threat-intelligence/vulnerabilities-and-exploits/
<https://msrc.microsoft.com/update-guide/vulnerability
<https://www.cvedetails.com/vendor/26/Microsoft.html
That's fake news created by Stallman and his communists!
Anonymous No.105951458 [Report]
>>105950896 (OP)
you have to configure it first, it's annoying but if you goof up the configuration it just allows anonymous requests (terrible design). in any case rtfm
Anonymous No.105951463 [Report]
Skill issue, this ain't shitty laravel framework bro.
Anonymous No.105951482 [Report] >>105954147
...did you do anything beyond just adding that word on top of your controller?
Anonymous No.105951551 [Report]
>>105950896 (OP)
> Pajeet-tier dogshit
Anonymous No.105951647 [Report]
>[Enhance]
>mind blown
Anonymous No.105951725 [Report] >>105951899
>>105950896 (OP)
>attribute is all you need for authorization
you're a low iq nigger and should stay away from computers
Anonymous No.105951899 [Report]
>>105951725
He probably used laraveljeet
Anonymous No.105952357 [Report] >>105952441
I think ASP.Net Core is comfy for APIs. It's just the right level of complexity and has a solid set of features.
Anonymous No.105952441 [Report] >>105952508
>>105952357
I like when it's strict by nature because it uses compiled language (C#/VB/F#) but not bloated like Sprinboot or full of hacks and shitty convention like scriptslop framework such as larajeet or django (FUCK LARAJEET, seriously what a piece of bloated crap, undebuggable, jeeted pile of crap)
Anonymous No.105952508 [Report] >>105952518
>>105952441
it's almost a guilty pleasure for me now
>company needs a new API for whatever
>open VS
>new api project
>copy openid config from other project
>scaffold a dbcontext for whatever database we're usign for this
>DI my dbcontext and DAL class
>LINQ up all the endpoints we need
>copy the devops yaml file and change the webapp name
>commit and push
>go get another coffee
>come back to a deployed webapp
>give QA the swagger URL for testing
Anonymous No.105952518 [Report] >>105952573
>>105952508
I like EF so much I've used it outside ASP. it's just THAT good.
Anonymous No.105952573 [Report] >>105952981
>>105952518
No reason not to use it in any C# codebase desu. If you have performance issues you should be creating view or stored procedures anyway.
[spoiler]I recently had to refactor some logic because it generated a contains with 60k guids and EF wasn't having it[/spoiler]
Anonymous No.105952981 [Report] >>105953719
>>105952573
I don't like stored procedure, ew
Anonymous No.105953719 [Report]
>>105952981
That's fine you ask the DBA to write it, then you just call it with EF and map it to an entity.
Anonymous No.105954147 [Report] >>105954178
>>105951482
allow-by-default authorization framework just came to me dumb as fuck
anyway how do I configure this because there seem to be 10 different ways to do it
Anonymous No.105954178 [Report] >>105955291
>>105954147
in your startup.cs just add like

services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(configuration)
//or
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApi(configuration)


or similar depending on your identity provider. You do have an identity provider right? If not you can also just do basic auth with cookies. The wizard can set it up for you on project creation.
Anonymous No.105955249 [Report]
>>105950896 (OP)
works on my machine
Anonymous No.105955291 [Report] >>105955306
>>105954178
>You do have an identity provider right?
It's dumb as fuck too that compiler/framework knows there's [Authorize] attribute on your code but doesn't do shit when it silently breaks because there's a problem with configuration. The IDE gives warnings and information for the most trivial shit you can imagine yet nothing in this case.
Anonymous No.105955306 [Report]
>>105955291
just lets you image what else there is that silently breaks. Can you really be sure of doing everthing properly with this behemoth of a software environment?