Table of Contents

Class CloudFoundryExtensions

Namespace
Steeltoe.Security.Authentication.CloudFoundry
Assembly
Steeltoe.Security.Authentication.CloudFoundryCore.dll
public static class CloudFoundryExtensions
Inheritance
CloudFoundryExtensions
Inherited Members

Methods

AddCloudFoundryJwtBearer(AuthenticationBuilder, IConfiguration)

Adds JWT middleware and configuration for using UAA or Pivotal SSO for bearer token authentication

public static AuthenticationBuilder AddCloudFoundryJwtBearer(this AuthenticationBuilder builder, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use JWT Bearer tokens from UAA or Pivotal SSO

AddCloudFoundryJwtBearer(AuthenticationBuilder, IConfiguration, Action<JwtBearerOptions, IConfiguration>)

Adds JWT middleware and configuration for using UAA or Pivotal SSO for bearer token authentication

public static AuthenticationBuilder AddCloudFoundryJwtBearer(this AuthenticationBuilder builder, IConfiguration config, Action<JwtBearerOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<JwtBearerOptions, IConfiguration>

Used to configure the options

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use JWT Bearer tokens from UAA or Pivotal SSO

AddCloudFoundryJwtBearer(AuthenticationBuilder, string, IConfiguration)

Adds JWT middleware and configuration for using UAA or Pivotal SSO for bearer token authentication

public static AuthenticationBuilder AddCloudFoundryJwtBearer(this AuthenticationBuilder builder, string authenticationScheme, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is AuthenticationScheme

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use JWT Bearer tokens from UAA or Pivotal SSO

AddCloudFoundryJwtBearer(AuthenticationBuilder, string, IConfiguration, Action<JwtBearerOptions, IConfiguration>)

Adds JWT middleware and configuration for using UAA or Pivotal SSO for bearer token authentication

public static AuthenticationBuilder AddCloudFoundryJwtBearer(this AuthenticationBuilder builder, string authenticationScheme, IConfiguration config, Action<JwtBearerOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is AuthenticationScheme

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<JwtBearerOptions, IConfiguration>

Used to configure the options

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use JWT Bearer tokens from UAA or Pivotal SSO

AddCloudFoundryJwtBearer(AuthenticationBuilder, string, string, IConfiguration)

Adds JWT middleware and configuration for using UAA or Pivotal SSO for bearer token authentication

public static AuthenticationBuilder AddCloudFoundryJwtBearer(this AuthenticationBuilder builder, string authenticationScheme, string displayName, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is AuthenticationScheme

displayName string

Sets a display name for this auth scheme. Defaults to AuthenticationScheme

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use JWT Bearer tokens from UAA or Pivotal SSO

AddCloudFoundryJwtBearer(AuthenticationBuilder, string, string, IConfiguration, Action<JwtBearerOptions, IConfiguration>)

Adds JWT middleware and configuration for using UAA or Pivotal SSO for bearer token authentication

public static AuthenticationBuilder AddCloudFoundryJwtBearer(this AuthenticationBuilder builder, string authenticationScheme, string displayName, IConfiguration config, Action<JwtBearerOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is AuthenticationScheme

displayName string

Sets a display name for this auth scheme. Defaults to AuthenticationScheme

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<JwtBearerOptions, IConfiguration>

Used to configure the options

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use JWT Bearer tokens from UAA or Pivotal SSO

AddCloudFoundryOAuth(AuthenticationBuilder, IConfiguration)

Adds OAuth middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOAuth(this AuthenticationBuilder builder, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OAuth with UAA or Pivotal SSO

AddCloudFoundryOAuth(AuthenticationBuilder, IConfiguration, Action<CloudFoundryOAuthOptions, IConfiguration>)

Adds OAuth middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOAuth(this AuthenticationBuilder builder, IConfiguration config, Action<CloudFoundryOAuthOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<CloudFoundryOAuthOptions, IConfiguration>

Used to configure the options

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OAuth with UAA or Pivotal SSO

AddCloudFoundryOAuth(AuthenticationBuilder, string, IConfiguration)

Adds OAuth middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOAuth(this AuthenticationBuilder builder, string authenticationScheme, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism.

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OAuth with UAA or Pivotal SSO

AddCloudFoundryOAuth(AuthenticationBuilder, string, IConfiguration, Action<CloudFoundryOAuthOptions, IConfiguration>)

Adds OAuth middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOAuth(this AuthenticationBuilder builder, string authenticationScheme, IConfiguration config, Action<CloudFoundryOAuthOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is DisplayName

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<CloudFoundryOAuthOptions, IConfiguration>

Used to configure the options

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OAuth with UAA or Pivotal SSO

AddCloudFoundryOAuth(AuthenticationBuilder, string, string, IConfiguration)

Adds OAuth middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOAuth(this AuthenticationBuilder builder, string authenticationScheme, string displayName, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism.

displayName string

Sets a display name for this auth scheme. Defaults to DisplayName

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OAuth with UAA or Pivotal SSO

AddCloudFoundryOAuth(AuthenticationBuilder, string, string, IConfiguration, Action<CloudFoundryOAuthOptions, IConfiguration>)

Adds OAuth middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOAuth(this AuthenticationBuilder builder, string authenticationScheme, string displayName, IConfiguration config, Action<CloudFoundryOAuthOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is DisplayName

displayName string

Sets a display name for this auth scheme. Defaults to DisplayName

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<CloudFoundryOAuthOptions, IConfiguration>

Used to configure the options

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OAuth with UAA or Pivotal SSO

AddCloudFoundryOpenIdConnect(AuthenticationBuilder, IConfiguration)

Adds OpenID Connect middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOpenIdConnect(this AuthenticationBuilder builder, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OpenID Connect with UAA or Pivotal SSO

AddCloudFoundryOpenIdConnect(AuthenticationBuilder, IConfiguration, Action<OpenIdConnectOptions, IConfiguration>)

Adds OpenID Connect middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOpenIdConnect(this AuthenticationBuilder builder, IConfiguration config, Action<OpenIdConnectOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<OpenIdConnectOptions, IConfiguration>

Configure the OpenIdConnectOptions after applying service bindings

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OpenID Connect with UAA or Pivotal SSO

AddCloudFoundryOpenIdConnect(AuthenticationBuilder, string, IConfiguration)

Adds OpenID Connect middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOpenIdConnect(this AuthenticationBuilder builder, string authenticationScheme, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is DisplayName

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OpenID Connect with UAA or Pivotal SSO

AddCloudFoundryOpenIdConnect(AuthenticationBuilder, string, IConfiguration, Action<OpenIdConnectOptions, IConfiguration>)

Adds OpenID Connect middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOpenIdConnect(this AuthenticationBuilder builder, string authenticationScheme, IConfiguration config, Action<OpenIdConnectOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is DisplayName

config IConfiguration

(Optional) Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<OpenIdConnectOptions, IConfiguration>

Configure the OpenIdConnectOptions after applying service bindings

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OpenID Connect with UAA or Pivotal SSO

AddCloudFoundryOpenIdConnect(AuthenticationBuilder, string, string, IConfiguration)

Adds OpenID Connect middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOpenIdConnect(this AuthenticationBuilder builder, string authenticationScheme, string displayName, IConfiguration config)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is DisplayName

displayName string

Sets a display name for this auth scheme. Defaults to DisplayName

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OpenID Connect with UAA or Pivotal SSO

AddCloudFoundryOpenIdConnect(AuthenticationBuilder, string, string, IConfiguration, Action<OpenIdConnectOptions, IConfiguration>)

Adds OpenID Connect middleware and configuration for using UAA or Pivotal SSO for user authentication

public static AuthenticationBuilder AddCloudFoundryOpenIdConnect(this AuthenticationBuilder builder, string authenticationScheme, string displayName, IConfiguration config, Action<OpenIdConnectOptions, IConfiguration> configurer)

Parameters

builder AuthenticationBuilder

Your AuthenticationBuilder

authenticationScheme string

An identifier for this authentication mechanism. Default value is DisplayName

displayName string

Sets a display name for this auth scheme. Defaults to DisplayName

config IConfiguration

Your application configuration. Be sure to include the CloudFoundryConfigurationProvider

configurer Action<OpenIdConnectOptions, IConfiguration>

Configure the OpenIdConnectOptions after applying service bindings

Returns

AuthenticationBuilder

AuthenticationBuilder configured to use OpenID Connect with UAA or Pivotal SSO

UseCloudFoundryJwtBearerAuthentication(IAppBuilder, IConfiguration, ILogger)

Configures and adds JWT bearer token middleware to the OWIN request pipeline

public static IAppBuilder UseCloudFoundryJwtBearerAuthentication(this IAppBuilder appBuilder, IConfiguration configuration, ILogger logger = null)

Parameters

appBuilder IAppBuilder

Your OWIN AppBuilder

configuration IConfiguration

Your application configuration

logger ILogger

Include for diagnostic logging during app start

Returns

IAppBuilder

Your Owin.IAppBuilder