...
Code Block | ||
---|---|---|
| ||
app.UseKodiakTokenValidation( "-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMI...", "https://kodiak.is", "https://kodiak.is", "RequestForQuoteService", "Server=kodi-mssql;Initial Catalog=CATALOG;User Id=user;Password=pass;", "SqlServer" ); |
Example request to service using the Token Authenticator
Code Block |
---|
wc.Headers[HttpRequestHeader.ContentType] = "application/json";
wc.Headers[HttpRequestHeader.Authorization] = "Bearer " + Kodi.Kodiak.Client.Settings.Context.KodiakServiceToken;
var response = await wc.UploadStringTaskAsync(Kodi.Kodiak.Client.Settings.Context.QuoteServerUrl + "api/quotes", json);
CreateQuoteResponse createQuoteResponse = JsonConvert.DeserializeObject<CreateQuoteResponse>(response); |