com.azure.identity.implementation.models.OidcTokenResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-identity Show documentation
Show all versions of azure-identity Show documentation
This module contains client library for Microsoft Azure Identity.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.identity.implementation.models;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
public class OidcTokenResponse implements JsonSerializable {
private String oidcToken;
public String getOidcToken() {
return oidcToken;
}
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
return jsonWriter.writeStartObject().writeStringField("oidcToken", oidcToken).writeEndObject();
}
public static OidcTokenResponse fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
OidcTokenResponse oidcTokenResponse = new OidcTokenResponse();
while (JsonToken.END_OBJECT != reader.nextToken()) {
String fieldName = reader.getFieldName();
if ("oidcToken".equals(fieldName)) {
oidcTokenResponse.oidcToken = reader.getString();
} else {
reader.skipChildren();
}
}
return oidcTokenResponse;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy