142 строки
11 KiB
YAML
142 строки
11 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.core.credential.AccessToken"
|
|
fullName: "com.azure.core.credential.AccessToken"
|
|
name: "AccessToken"
|
|
nameWithType: "AccessToken"
|
|
summary: "Represents an immutable access token with a token string and an expiration time."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public class **AccessToken**"
|
|
constructors:
|
|
- uid: "com.azure.core.credential.AccessToken.AccessToken(java.lang.String,java.time.OffsetDateTime)"
|
|
fullName: "com.azure.core.credential.AccessToken.AccessToken(String token, OffsetDateTime expiresAt)"
|
|
name: "AccessToken(String token, OffsetDateTime expiresAt)"
|
|
nameWithType: "AccessToken.AccessToken(String token, OffsetDateTime expiresAt)"
|
|
summary: "Creates an access token instance."
|
|
parameters:
|
|
- description: "the token string."
|
|
name: "token"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "the expiration time."
|
|
name: "expiresAt"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
|
|
syntax: "public AccessToken(String token, OffsetDateTime expiresAt)"
|
|
desc: "Creates an access token instance."
|
|
- uid: "com.azure.core.credential.AccessToken.AccessToken(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime)"
|
|
fullName: "com.azure.core.credential.AccessToken.AccessToken(String token, OffsetDateTime expiresAt, OffsetDateTime refreshAt)"
|
|
name: "AccessToken(String token, OffsetDateTime expiresAt, OffsetDateTime refreshAt)"
|
|
nameWithType: "AccessToken.AccessToken(String token, OffsetDateTime expiresAt, OffsetDateTime refreshAt)"
|
|
summary: "Creates an access token instance."
|
|
parameters:
|
|
- description: "the token string."
|
|
name: "token"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "the expiration time."
|
|
name: "expiresAt"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
|
|
- description: "the next token refresh time."
|
|
name: "refreshAt"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
|
|
syntax: "public AccessToken(String token, OffsetDateTime expiresAt, OffsetDateTime refreshAt)"
|
|
desc: "Creates an access token instance."
|
|
- uid: "com.azure.core.credential.AccessToken.AccessToken(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime,java.lang.String)"
|
|
fullName: "com.azure.core.credential.AccessToken.AccessToken(String token, OffsetDateTime expiresAt, OffsetDateTime refreshAt, String tokenType)"
|
|
name: "AccessToken(String token, OffsetDateTime expiresAt, OffsetDateTime refreshAt, String tokenType)"
|
|
nameWithType: "AccessToken.AccessToken(String token, OffsetDateTime expiresAt, OffsetDateTime refreshAt, String tokenType)"
|
|
summary: "Creates an access token instance."
|
|
parameters:
|
|
- description: "the token string."
|
|
name: "token"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "the expiration time."
|
|
name: "expiresAt"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
|
|
- description: "the next token refresh time."
|
|
name: "refreshAt"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
|
|
- description: "the type of token."
|
|
name: "tokenType"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public AccessToken(String token, OffsetDateTime expiresAt, OffsetDateTime refreshAt, String tokenType)"
|
|
desc: "Creates an access token instance."
|
|
methods:
|
|
- uid: "com.azure.core.credential.AccessToken.getDurationUntilExpiration()"
|
|
fullName: "com.azure.core.credential.AccessToken.getDurationUntilExpiration()"
|
|
name: "getDurationUntilExpiration()"
|
|
nameWithType: "AccessToken.getDurationUntilExpiration()"
|
|
summary: "Gets the <xref uid=\"java.time.Duration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Duration\"></xref> until the <xref uid=\"com.azure.core.credential.AccessToken\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AccessToken\"></xref> expires."
|
|
syntax: "public Duration getDurationUntilExpiration()"
|
|
desc: "Gets the <xref uid=\"java.time.Duration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Duration\"></xref> until the <xref uid=\"com.azure.core.credential.AccessToken\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AccessToken\"></xref> expires.\n\nThe <xref uid=\"java.time.Duration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Duration\"></xref> is based on the <xref uid=\"java.time.OffsetDateTime.now*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"current time\"></xref> and may return a negative <xref uid=\"java.time.Duration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Duration\"></xref>, indicating that the <xref uid=\"com.azure.core.credential.AccessToken\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AccessToken\"></xref> has expired."
|
|
returns:
|
|
description: "The <xref uid=\"java.time.Duration\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Duration\"></xref> until the <xref uid=\"com.azure.core.credential.AccessToken\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AccessToken\"></xref> expires."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- uid: "com.azure.core.credential.AccessToken.getExpiresAt()"
|
|
fullName: "com.azure.core.credential.AccessToken.getExpiresAt()"
|
|
name: "getExpiresAt()"
|
|
nameWithType: "AccessToken.getExpiresAt()"
|
|
summary: "Gets the time when the token expires, in UTC."
|
|
syntax: "public OffsetDateTime getExpiresAt()"
|
|
desc: "Gets the time when the token expires, in UTC."
|
|
returns:
|
|
description: "The time when the token expires, in UTC."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
|
|
- uid: "com.azure.core.credential.AccessToken.getRefreshAt()"
|
|
fullName: "com.azure.core.credential.AccessToken.getRefreshAt()"
|
|
name: "getRefreshAt()"
|
|
nameWithType: "AccessToken.getRefreshAt()"
|
|
summary: "Gets the time when the token should refresh next, in UTC."
|
|
syntax: "public OffsetDateTime getRefreshAt()"
|
|
desc: "Gets the time when the token should refresh next, in UTC.\n\nNote: This value can be null as it is not always provided by the service. When it is provided, it overrides the default refresh offset used by the <xref uid=\"com.azure.core.http.policy.BearerTokenAuthenticationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.http.policy.BearerTokenAuthenticationPolicy\"></xref> to proactively refresh the token."
|
|
returns:
|
|
description: "The time when the token should refresh next, in UTC."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
|
|
- uid: "com.azure.core.credential.AccessToken.getToken()"
|
|
fullName: "com.azure.core.credential.AccessToken.getToken()"
|
|
name: "getToken()"
|
|
nameWithType: "AccessToken.getToken()"
|
|
summary: "Gets the token."
|
|
syntax: "public String getToken()"
|
|
desc: "Gets the token."
|
|
returns:
|
|
description: "The token."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.core.credential.AccessToken.getTokenType()"
|
|
fullName: "com.azure.core.credential.AccessToken.getTokenType()"
|
|
name: "getTokenType()"
|
|
nameWithType: "AccessToken.getTokenType()"
|
|
summary: "Gets the token type."
|
|
syntax: "public String getTokenType()"
|
|
desc: "Gets the token type."
|
|
returns:
|
|
description: "A string representing the token type. It can be \"Bearer\" or \"Pop\"."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.core.credential.AccessToken.isExpired()"
|
|
fullName: "com.azure.core.credential.AccessToken.isExpired()"
|
|
name: "isExpired()"
|
|
nameWithType: "AccessToken.isExpired()"
|
|
summary: "Whether the token has expired."
|
|
syntax: "public boolean isExpired()"
|
|
desc: "Whether the token has expired."
|
|
returns:
|
|
description: "Whether the token has expired."
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
type: "class"
|
|
desc: "Represents an immutable access token with a token string and an expiration time.\n\nAn Access Token is a security token that is issued by an authentication source, such as Azure Active Directory (AAD), and it represents the authorization to access a specific resource or service. It is typically used to authenticate and authorize requests made to Azure services.\n\nAccess Tokens are obtained through the authentication process, where the user or application presents valid credentials (such as a client ID, client secret, username/password, or certificate) to the authentication source. The authentication source then verifies the credentials and issues an Access Token, which is a time-limited token that grants access to the requested resource.\n\nOnce an Access Token is obtained, it can be included in the Authorization header of HTTP requests to authenticate and authorize requests to Azure services."
|
|
metadata: {}
|
|
package: "com.azure.core.credential"
|
|
artifact: com.azure:azure-core:1.54.0
|