AuthInfo Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.AuthInfo

Implements

public final class AuthInfo
implements JsonSerializable<AuthInfo>

The authorization properties for accessing the source code repository.

Constructor Summary

Constructor Description
AuthInfo()

Creates an instance of AuthInfo class.

Method Summary

Modifier and Type Method and Description
Integer expiresIn()

Get the expiresIn property: Time in seconds that the token remains valid.

static AuthInfo fromJson(JsonReader jsonReader)

Reads an instance of AuthInfo from the JsonReader.

String refreshToken()

Get the refreshToken property: The refresh token used to refresh the access token.

String scope()

Get the scope property: The scope of the access token.

JsonWriter toJson(JsonWriter jsonWriter)
String token()

Get the token property: The access token used to access the source control provider.

TokenType tokenType()

Get the tokenType property: The type of Auth token.

void validate()

Validates the instance.

AuthInfo withExpiresIn(Integer expiresIn)

Set the expiresIn property: Time in seconds that the token remains valid.

AuthInfo withRefreshToken(String refreshToken)

Set the refreshToken property: The refresh token used to refresh the access token.

AuthInfo withScope(String scope)

Set the scope property: The scope of the access token.

AuthInfo withToken(String token)

Set the token property: The access token used to access the source control provider.

AuthInfo withTokenType(TokenType tokenType)

Set the tokenType property: The type of Auth token.

Methods inherited from java.lang.Object

Constructor Details

AuthInfo

public AuthInfo()

Creates an instance of AuthInfo class.

Method Details

expiresIn

public Integer expiresIn()

Get the expiresIn property: Time in seconds that the token remains valid.

Returns:

the expiresIn value.

fromJson

public static AuthInfo fromJson(JsonReader jsonReader)

Reads an instance of AuthInfo from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AuthInfo if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

refreshToken

public String refreshToken()

Get the refreshToken property: The refresh token used to refresh the access token.

Returns:

the refreshToken value.

scope

public String scope()

Get the scope property: The scope of the access token.

Returns:

the scope value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

token

public String token()

Get the token property: The access token used to access the source control provider.

Returns:

the token value.

tokenType

public TokenType tokenType()

Get the tokenType property: The type of Auth token.

Returns:

the tokenType value.

validate

public void validate()

Validates the instance.

withExpiresIn

public AuthInfo withExpiresIn(Integer expiresIn)

Set the expiresIn property: Time in seconds that the token remains valid.

Parameters:

expiresIn - the expiresIn value to set.

Returns:

the AuthInfo object itself.

withRefreshToken

public AuthInfo withRefreshToken(String refreshToken)

Set the refreshToken property: The refresh token used to refresh the access token.

Parameters:

refreshToken - the refreshToken value to set.

Returns:

the AuthInfo object itself.

withScope

public AuthInfo withScope(String scope)

Set the scope property: The scope of the access token.

Parameters:

scope - the scope value to set.

Returns:

the AuthInfo object itself.

withToken

public AuthInfo withToken(String token)

Set the token property: The access token used to access the source control provider.

Parameters:

token - the token value to set.

Returns:

the AuthInfo object itself.

withTokenType

public AuthInfo withTokenType(TokenType tokenType)

Set the tokenType property: The type of Auth token.

Parameters:

tokenType - the tokenType value to set.

Returns:

the AuthInfo object itself.

Applies to