joaozitopolo / lb-4-auth-test Goto Github PK
View Code? Open in Web Editor NEWLoopback 4 and Passaport Basic Authentication with test
Loopback 4 and Passaport Basic Authentication with test
Very interested in getting authentication to work but I get the following
curl -X GET http://localhost:3000/whoami -H 'Authorization: Basic dXNlcjFAdGVzdC5jb206MTIzNA=='
Invoke-WebRequest : Cannot bind parameter 'Headers'. Cannot convert the "Authorization: Basic dXNlcjFAdGVzdC5jb206MTIzNA==" value of type "System.String" to type "System.Collections.IDictionary".
At line:1 char:45
+ ... st:3000/whoami -H 'Authorization: Basic dXNlcjFAdGVzdC5jb206MTIzNA=='
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
on server conso;e
D:\Loopback\lb-4-auth-test>curl --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL
D:\Loopback\lb-4-auth-test> curl -X GET http://localhost:3000/whoami -H 'Authorization: Basic dXNlcjFAdGVzdC5jb206MTIzNA=='
{"error":{"statusCode":401,"name":"UnauthorizedError","message":"Basic realm=\"Users\""}}curl: (6) Could not resolve host: Basic
curl: (6) Could not resolve host: dXNlcjFAdGVzdC5jb206MTIzNA=='
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.