42 строки
5.3 KiB
YAML
42 строки
5.3 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.identity.AuthorizationCodeCredential"
|
|
fullName: "com.azure.identity.AuthorizationCodeCredential"
|
|
name: "AuthorizationCodeCredential"
|
|
nameWithType: "AuthorizationCodeCredential"
|
|
summary: "Authorization Code authentication in Azure is a type of authentication mechanism that allows users to authenticate with [Microsoft Entra ID][] and obtain an authorization code that can be used to request an access token to access Azure resources.\n\n\n[Microsoft Entra ID]: https://learn.microsoft.com/entra/fundamentals/"
|
|
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 **AuthorizationCodeCredential**</br> implements <xref href=\"com.azure.core.credential.TokenCredential?alt=com.azure.core.credential.TokenCredential&text=TokenCredential\" data-throw-if-not-resolved=\"False\" />"
|
|
methods:
|
|
- uid: "com.azure.identity.AuthorizationCodeCredential.getToken(com.azure.core.credential.TokenRequestContext)"
|
|
fullName: "com.azure.identity.AuthorizationCodeCredential.getToken(TokenRequestContext request)"
|
|
name: "getToken(TokenRequestContext request)"
|
|
nameWithType: "AuthorizationCodeCredential.getToken(TokenRequestContext request)"
|
|
parameters:
|
|
- name: "request"
|
|
type: "<xref href=\"com.azure.core.credential.TokenRequestContext?alt=com.azure.core.credential.TokenRequestContext&text=TokenRequestContext\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<AccessToken> getToken(TokenRequestContext request)"
|
|
returns:
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.credential.AccessToken?alt=com.azure.core.credential.AccessToken&text=AccessToken\" data-throw-if-not-resolved=\"False\" />>"
|
|
type: "class"
|
|
desc: "Authorization Code authentication in Azure is a type of authentication mechanism that allows users to authenticate with [Microsoft Entra ID][] and obtain an authorization code that can be used to request an access token to access Azure resources. It is a widely used authentication mechanism and is supported by a wide range of Azure services and applications. It provides a secure and scalable way to authenticate users and grant them access to Azure resources. The AuthorizationCodeCredential authenticates a user or an application and acquires a token with the configured authorization code and the redirectURL where authorization code was received.\n\n**Sample: Construct AuthorizationCodeCredential**\n\nThe following code sample demonstrates the creation of a <xref uid=\"com.azure.identity.AuthorizationCodeCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.identity.AuthorizationCodeCredential\"></xref>, using the <xref uid=\"com.azure.identity.AuthorizationCodeCredentialBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.identity.AuthorizationCodeCredentialBuilder\"></xref> to configure it. The `authorizationCode`, `redirectUrl` and `clientId` are required to be configured to create <xref uid=\"com.azure.identity.AuthorizationCodeCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AuthorizationCodeCredential\"></xref>. Once this credential is created, it may be passed into the builder of many of the Azure SDK for Java client builders as the 'credential' parameter.\n\n```java\nTokenCredential authorizationCodeCredential = new AuthorizationCodeCredentialBuilder().authorizationCode(\n \"{authorization-code-received-at-redirectURL}\")\n .redirectUrl(\"{redirectUrl-where-authorization-code-is-received}\")\n .clientId(\"{clientId-of-application-being-authenticated\")\n .build();\n```\n\n\n[Microsoft Entra ID]: https://learn.microsoft.com/entra/fundamentals/"
|
|
implements:
|
|
- "<xref href=\"com.azure.core.credential.TokenCredential?alt=com.azure.core.credential.TokenCredential&text=TokenCredential\" data-throw-if-not-resolved=\"False\" />"
|
|
metadata: {}
|
|
package: "com.azure.identity"
|
|
artifact: com.azure:azure-identity:1.14.1
|