Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1501

HTTP Auth header

$
0
0

I use this web page to create an auth header to access an API

https://www.debugbear.com/basic-auth-header-generator

It works... but I would prefer not to type a username + password into a webpage, so I looked up how-to-do on the command line and found this webpage

https://docs.alertlogic.com/configure/connections/authorization-header.htm

It also works, but ideally I would like to do this in C, so I set about coding it here on an Arduino.

unsigned char auth[] = "login:password";unsigned char base64[64];unsigned int base64_length = encode_base64(auth, strlen((char *) (auth)), base64);Serial.println(base64_length); Serial.println(( char *) base64); 

But this doesn't work? Its very close, almost getting it right until the very end when it returns a different result?

What have I missed?


Viewing all articles
Browse latest Browse all 1501

Trending Articles