AuthorizationServer

class AuthorizationServer : KotlinCustomResource

External OAuth authorization server settings. API Version: 2020-12-01.

Example Usage

ApiManagementCreateAuthorizationServer

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var authorizationServer = new AzureNative.ApiManagement.AuthorizationServer("authorizationServer", new()
{
AuthorizationEndpoint = "https://www.contoso.com/oauth2/auth",
AuthorizationMethods = new[]
{
AzureNative.ApiManagement.AuthorizationMethod.GET,
},
Authsid = "newauthServer",
BearerTokenSendingMethods = new[]
{
"authorizationHeader",
},
ClientId = "1",
ClientRegistrationEndpoint = "https://www.contoso.com/apps",
ClientSecret = "2",
DefaultScope = "read write",
Description = "test server",
DisplayName = "test2",
GrantTypes = new[]
{
"authorizationCode",
"implicit",
},
ResourceGroupName = "rg1",
ResourceOwnerPassword = "pwd",
ResourceOwnerUsername = "un",
ServiceName = "apimService1",
SupportState = true,
TokenEndpoint = "https://www.contoso.com/oauth2/token",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewAuthorizationServer(ctx, "authorizationServer", &apimanagement.AuthorizationServerArgs{
AuthorizationEndpoint: pulumi.String("https://www.contoso.com/oauth2/auth"),
AuthorizationMethods: []apimanagement.AuthorizationMethod{
apimanagement.AuthorizationMethodGET,
},
Authsid: pulumi.String("newauthServer"),
BearerTokenSendingMethods: pulumi.StringArray{
pulumi.String("authorizationHeader"),
},
ClientId: pulumi.String("1"),
ClientRegistrationEndpoint: pulumi.String("https://www.contoso.com/apps"),
ClientSecret: pulumi.String("2"),
DefaultScope: pulumi.String("read write"),
Description: pulumi.String("test server"),
DisplayName: pulumi.String("test2"),
GrantTypes: pulumi.StringArray{
pulumi.String("authorizationCode"),
pulumi.String("implicit"),
},
ResourceGroupName: pulumi.String("rg1"),
ResourceOwnerPassword: pulumi.String("pwd"),
ResourceOwnerUsername: pulumi.String("un"),
ServiceName: pulumi.String("apimService1"),
SupportState: pulumi.Bool(true),
TokenEndpoint: pulumi.String("https://www.contoso.com/oauth2/token"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.AuthorizationServer;
import com.pulumi.azurenative.apimanagement.AuthorizationServerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var authorizationServer = new AuthorizationServer("authorizationServer", AuthorizationServerArgs.builder()
.authorizationEndpoint("https://www.contoso.com/oauth2/auth")
.authorizationMethods("GET")
.authsid("newauthServer")
.bearerTokenSendingMethods("authorizationHeader")
.clientId("1")
.clientRegistrationEndpoint("https://www.contoso.com/apps")
.clientSecret("2")
.defaultScope("read write")
.description("test server")
.displayName("test2")
.grantTypes(
"authorizationCode",
"implicit")
.resourceGroupName("rg1")
.resourceOwnerPassword("pwd")
.resourceOwnerUsername("un")
.serviceName("apimService1")
.supportState(true)
.tokenEndpoint("https://www.contoso.com/oauth2/token")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:apimanagement:AuthorizationServer newauthServer /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer

Properties

Link copied to clipboard

OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.

Link copied to clipboard

HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.

Link copied to clipboard

Specifies the mechanism by which access token is passed to the API.

Link copied to clipboard

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.

Link copied to clipboard
val clientId: Output<String>

Client or app id registered with this authorization server.

Link copied to clipboard

Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.

Link copied to clipboard
val clientSecret: Output<String>?

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.

Link copied to clipboard
val defaultScope: Output<String>?

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.

Link copied to clipboard
val description: Output<String>?

Description of the authorization server. Can contain HTML formatting tags.

Link copied to clipboard
val displayName: Output<String>

User-friendly authorization server name.

Link copied to clipboard
val grantTypes: Output<List<String>>

Form of an authorization grant, which the client uses to request the access token.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.

Link copied to clipboard

Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.

Link copied to clipboard
val supportState: Output<Boolean>?

If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.

Link copied to clipboard

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"}.

Link copied to clipboard
val tokenEndpoint: Output<String>?

OAuth token endpoint. Contains absolute URI to entity being referenced.

Link copied to clipboard
val type: Output<String>

Resource type for API Management resource.

Link copied to clipboard
val urn: Output<String>