Dot Net Tutorials

Test

try { //Get the authentication token from the request header var authenticationToken = request.Headers.GetValues(“Authorization”).FirstOrDefault(); if (authenticationToken != null) { byte[] data = Convert.FromBase64String(authenticationToken); //Decode the string string decodedAuthenticationToken = Encoding.UTF8.GetString(data); //Convert the string into an string array string[] UsernamePasswordArray = decodedAuthenticationToken.Split(‘:’); //First element of the array is the username string username = UsernamePasswordArray[0]; //Second element …

Test Read More »