通过


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CodeTransparencyClient.GetPublicKeys Method

Definition

Overloads

Name Description
GetPublicKeys(RequestContext)

[Protocol Method] Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri implementation

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetPublicKeys(CancellationToken)

Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri implementation.

GetPublicKeys(RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri implementation

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response GetPublicKeys(Azure.RequestContext context);
abstract member GetPublicKeys : Azure.RequestContext -> Azure.Response
override this.GetPublicKeys : Azure.RequestContext -> Azure.Response
Public Overridable Function GetPublicKeys (context As RequestContext) As Response

Parameters

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetPublicKeys and parse the result.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response response = client.GetPublicKeys(null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("keys")[0].GetProperty("kty").ToString());

Applies to

GetPublicKeys(CancellationToken)

Source:
CodeTransparencyClient.cs

Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri implementation.

public virtual Azure.Response<Azure.Security.CodeTransparency.JwksDocument> GetPublicKeys(System.Threading.CancellationToken cancellationToken = default);
abstract member GetPublicKeys : System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.JwksDocument>
override this.GetPublicKeys : System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.JwksDocument>
Public Overridable Function GetPublicKeys (Optional cancellationToken As CancellationToken = Nothing) As Response(Of JwksDocument)

Parameters

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetPublicKeys.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response<JwksDocument> response = client.GetPublicKeys();

Applies to