Class AuthorizationServerContractProperties
java.lang.Object
com.azure.resourcemanager.apimanagement.models.AuthorizationServerContractBaseProperties
com.azure.resourcemanager.apimanagement.fluent.models.AuthorizationServerContractProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AuthorizationServerContractBaseProperties>
public final class AuthorizationServerContractProperties
extends AuthorizationServerContractBaseProperties
External OAuth authorization server settings Properties.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AuthorizationServerContractProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the authorizationEndpoint property: OAuth authorization endpoint.clientId()Get the clientId property: Client or app id registered with this authorization server.Get the clientRegistrationEndpoint property: Optional reference to a page where client or app registration for this authorization server is performed.Get the clientSecret property: Client or app secret registered with this authorization server.Get the displayName property: User-friendly authorization server name.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AuthorizationServerContractProperties from the JsonReader.Get the grantTypes property: Form of an authorization grant, which the client uses to request the access token.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the useInApiDocumentation property: If true, the authorization server will be used in the API documentation in the developer portal.Get the useInTestConsole property: If true, the authorization server may be used in the developer portal test console.voidvalidate()Validates the instance.withAuthorizationEndpoint(String authorizationEndpoint) Set the authorizationEndpoint property: OAuth authorization endpoint.withAuthorizationMethods(List<AuthorizationMethod> authorizationMethods) Set the authorizationMethods property: HTTP verbs supported by the authorization endpoint.withBearerTokenSendingMethods(List<BearerTokenSendingMethod> bearerTokenSendingMethods) Set the bearerTokenSendingMethods property: Specifies the mechanism by which access token is passed to the API.withClientAuthenticationMethod(List<ClientAuthenticationMethod> clientAuthenticationMethod) Set the clientAuthenticationMethod property: Method of authentication supported by the token endpoint of this authorization server.withClientId(String clientId) Set the clientId property: Client or app id registered with this authorization server.withClientRegistrationEndpoint(String clientRegistrationEndpoint) Set the clientRegistrationEndpoint property: Optional reference to a page where client or app registration for this authorization server is performed.withClientSecret(String clientSecret) Set the clientSecret property: Client or app secret registered with this authorization server.withDefaultScope(String defaultScope) Set the defaultScope property: Access token scope that is going to be requested by default.withDescription(String description) Set the description property: Description of the authorization server.withDisplayName(String displayName) Set the displayName property: User-friendly authorization server name.withGrantTypes(List<GrantType> grantTypes) Set the grantTypes property: Form of an authorization grant, which the client uses to request the access token.withResourceOwnerPassword(String resourceOwnerPassword) Set the resourceOwnerPassword property: Can be optionally specified when resource owner password grant type is supported by this authorization server.withResourceOwnerUsername(String resourceOwnerUsername) Set the resourceOwnerUsername property: Can be optionally specified when resource owner password grant type is supported by this authorization server.withSupportState(Boolean supportState) Set the supportState property: If true, authorization server will include state parameter from the authorization request to its response.withTokenBodyParameters(List<TokenBodyParameterContract> tokenBodyParameters) Set the tokenBodyParameters property: Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e.withTokenEndpoint(String tokenEndpoint) Set the tokenEndpoint property: OAuth token endpoint.withUseInApiDocumentation(Boolean useInApiDocumentation) Set the useInApiDocumentation property: If true, the authorization server will be used in the API documentation in the developer portal.withUseInTestConsole(Boolean useInTestConsole) Set the useInTestConsole property: If true, the authorization server may be used in the developer portal test console.Methods inherited from class com.azure.resourcemanager.apimanagement.models.AuthorizationServerContractBaseProperties
authorizationMethods, bearerTokenSendingMethods, clientAuthenticationMethod, defaultScope, description, resourceOwnerPassword, resourceOwnerUsername, supportState, tokenBodyParameters, tokenEndpointMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
AuthorizationServerContractProperties
public AuthorizationServerContractProperties()Creates an instance of AuthorizationServerContractProperties class.
-
-
Method Details
-
displayName
Get the displayName property: User-friendly authorization server name.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: User-friendly authorization server name.- Parameters:
displayName- the displayName value to set.- Returns:
- the AuthorizationServerContractProperties object itself.
-
useInTestConsole
Get the useInTestConsole property: If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.- Returns:
- the useInTestConsole value.
-
withUseInTestConsole
Set the useInTestConsole property: If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.- Parameters:
useInTestConsole- the useInTestConsole value to set.- Returns:
- the AuthorizationServerContractProperties object itself.
-
useInApiDocumentation
Get the useInApiDocumentation property: If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.- Returns:
- the useInApiDocumentation value.
-
withUseInApiDocumentation
public AuthorizationServerContractProperties withUseInApiDocumentation(Boolean useInApiDocumentation) Set the useInApiDocumentation property: If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.- Parameters:
useInApiDocumentation- the useInApiDocumentation value to set.- Returns:
- the AuthorizationServerContractProperties object itself.
-
clientRegistrationEndpoint
Get the clientRegistrationEndpoint property: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.- Returns:
- the clientRegistrationEndpoint value.
-
withClientRegistrationEndpoint
public AuthorizationServerContractProperties withClientRegistrationEndpoint(String clientRegistrationEndpoint) Set the clientRegistrationEndpoint property: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.- Parameters:
clientRegistrationEndpoint- the clientRegistrationEndpoint value to set.- Returns:
- the AuthorizationServerContractProperties object itself.
-
authorizationEndpoint
Get the authorizationEndpoint property: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.- Returns:
- the authorizationEndpoint value.
-
withAuthorizationEndpoint
public AuthorizationServerContractProperties withAuthorizationEndpoint(String authorizationEndpoint) Set the authorizationEndpoint property: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.- Parameters:
authorizationEndpoint- the authorizationEndpoint value to set.- Returns:
- the AuthorizationServerContractProperties object itself.
-
grantTypes
Get the grantTypes property: Form of an authorization grant, which the client uses to request the access token.- Returns:
- the grantTypes value.
-
withGrantTypes
Set the grantTypes property: Form of an authorization grant, which the client uses to request the access token.- Parameters:
grantTypes- the grantTypes value to set.- Returns:
- the AuthorizationServerContractProperties object itself.
-
clientId
Get the clientId property: Client or app id registered with this authorization server.- Returns:
- the clientId value.
-
withClientId
Set the clientId property: Client or app id registered with this authorization server.- Parameters:
clientId- the clientId value to set.- Returns:
- the AuthorizationServerContractProperties object itself.
-
clientSecret
Get the clientSecret property: Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.- Returns:
- the clientSecret value.
-
withClientSecret
Set the clientSecret property: Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.- Parameters:
clientSecret- the clientSecret value to set.- Returns:
- the AuthorizationServerContractProperties object itself.
-
withDescription
Set the description property: Description of the authorization server. Can contain HTML formatting tags.- Overrides:
withDescriptionin classAuthorizationServerContractBaseProperties- Parameters:
description- the description value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withAuthorizationMethods
public AuthorizationServerContractProperties withAuthorizationMethods(List<AuthorizationMethod> authorizationMethods) Set the authorizationMethods property: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.- Overrides:
withAuthorizationMethodsin classAuthorizationServerContractBaseProperties- Parameters:
authorizationMethods- the authorizationMethods value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withClientAuthenticationMethod
public AuthorizationServerContractProperties withClientAuthenticationMethod(List<ClientAuthenticationMethod> clientAuthenticationMethod) Set the clientAuthenticationMethod property: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.- Overrides:
withClientAuthenticationMethodin classAuthorizationServerContractBaseProperties- Parameters:
clientAuthenticationMethod- the clientAuthenticationMethod value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withTokenBodyParameters
public AuthorizationServerContractProperties withTokenBodyParameters(List<TokenBodyParameterContract> tokenBodyParameters) Set the tokenBodyParameters property: Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.- Overrides:
withTokenBodyParametersin classAuthorizationServerContractBaseProperties- Parameters:
tokenBodyParameters- the tokenBodyParameters value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withTokenEndpoint
Set the tokenEndpoint property: OAuth token endpoint. Contains absolute URI to entity being referenced.- Overrides:
withTokenEndpointin classAuthorizationServerContractBaseProperties- Parameters:
tokenEndpoint- the tokenEndpoint value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withSupportState
Set the supportState property: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.- Overrides:
withSupportStatein classAuthorizationServerContractBaseProperties- Parameters:
supportState- the supportState value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withDefaultScope
Set the defaultScope property: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.- Overrides:
withDefaultScopein classAuthorizationServerContractBaseProperties- Parameters:
defaultScope- the defaultScope value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withBearerTokenSendingMethods
public AuthorizationServerContractProperties withBearerTokenSendingMethods(List<BearerTokenSendingMethod> bearerTokenSendingMethods) Set the bearerTokenSendingMethods property: Specifies the mechanism by which access token is passed to the API.- Overrides:
withBearerTokenSendingMethodsin classAuthorizationServerContractBaseProperties- Parameters:
bearerTokenSendingMethods- the bearerTokenSendingMethods value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withResourceOwnerUsername
public AuthorizationServerContractProperties withResourceOwnerUsername(String resourceOwnerUsername) Set the resourceOwnerUsername property: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.- Overrides:
withResourceOwnerUsernamein classAuthorizationServerContractBaseProperties- Parameters:
resourceOwnerUsername- the resourceOwnerUsername value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
withResourceOwnerPassword
public AuthorizationServerContractProperties withResourceOwnerPassword(String resourceOwnerPassword) Set the resourceOwnerPassword property: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.- Overrides:
withResourceOwnerPasswordin classAuthorizationServerContractBaseProperties- Parameters:
resourceOwnerPassword- the resourceOwnerPassword value to set.- Returns:
- the AuthorizationServerContractBaseProperties object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classAuthorizationServerContractBaseProperties- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AuthorizationServerContractBaseProperties>- Overrides:
toJsonin classAuthorizationServerContractBaseProperties- Throws:
IOException
-
fromJson
public static AuthorizationServerContractProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AuthorizationServerContractProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AuthorizationServerContractProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the AuthorizationServerContractProperties.
-