Top Description Methods
org.eclipse.microprofile.openapi.models.security

public Interface OAuthFlow

extends Constructible, Extensible<OAuthFlow>
Imports
java.util.Map, org.eclipse.microprofile.openapi.models.Constructible, .Extensible

Configuration details for a supportde OAuthFlow
See Also
OpenAPI Specification OAuth Flow Object

Method Summary

Modifier and TypeMethod and Description
public OAuthFlow

Returns:

the current OAuthFlow instance
addScope
(String
the name of a scope
scope
,
String
description of the scope.
description
)

Adds name of an existing scope object and item parameters to scopes as a key-value pair in a map.

public default OAuthFlow

Returns:

OAuthFlow instance with the set authorizationUrl property
authorizationUrl
(String
the authorization URL used for this flow
authorizationUrl
)

The authorization URL to be used for this flow.

public String

Returns:

String authorizationUrl
getAuthorizationUrl
()

The authorization URL to be used for this flow.

public String

Returns:

String refreshUrl
getRefreshUrl
()

The URL to be used for obtaining refresh tokens.

public Map<String, String>

Returns:

a copy Map (potentially immutable) containing scopes and their descriptions
getScopes
()

The available scopes for the OAuth2 security scheme.

public String

Returns:

String tokenUrl
getTokenUrl
()

The token URL to be used for this flow.

public default OAuthFlow

Returns:

OAuthFlow instance with the set refreshUrl property
refreshUrl
(String
the URL to be used for obtaining refresh tokens
refreshUrl
)

The URL to be used for obtaining refresh tokens.

public void
removeScope(String
the name of a scope
scope
)

Removes the given scope item to this scope mapping.

public default OAuthFlow

Returns:

OAuthFlow instance with the set scopes property
scopes
(Map<String, String>
the available scopes for the OAuth2 security scheme
scopes
)

The available scopes for the OAuth2 security scheme.

public void
setAuthorizationUrl(String
the authorization URL used for this flow
authorizationUrl
)

The authorization URL to be used for this flow.

public void
setRefreshUrl(String
the URL to be used for obtaining refresh tokens
refreshUrl
)

The URL to be used for obtaining refresh tokens.

public void
setScopes(Map<String, String>
the available scopes for the OAuth2 security scheme
scopes
)

The available scopes for the OAuth2 security scheme.

public void
setTokenUrl(String
the token URL to be used for this flow
tokenUrl
)

The token URL to be used for this flow.

public default OAuthFlow

Returns:

OAuthFlow instance with the set tokenUrl property
tokenUrl
(String
the token URL to be used for this flow
tokenUrl
)

The token URL to be used for this flow.

Inherited from org.eclipse.microprofile.openapi.models.Extensible:
addExtensionextensionsgetExtensionsremoveExtensionsetExtensions

Method Detail

addScopeback to summary
public OAuthFlow addScope(String scope, String description)

Adds name of an existing scope object and item parameters to scopes as a key-value pair in a map.

Parameters
scope:String

the name of a scope

description:String

description of the scope.

Returns:OAuthFlow

the current OAuthFlow instance

authorizationUrlback to summary
public default OAuthFlow authorizationUrl(String authorizationUrl)

The authorization URL to be used for this flow. This MUST be in the form of a URL. This is a REQUIRED property.

Applies to oauth2 ("implicit", "authorizationCode").

This method sets the authorizationUrl property of OAuthFlow instance to the given authorizationUrl argument and returns the modified instance.

Parameters
authorizationUrl:String

the authorization URL used for this flow

Returns:OAuthFlow

OAuthFlow instance with the set authorizationUrl property

getAuthorizationUrlback to summary
public String getAuthorizationUrl()

The authorization URL to be used for this flow. This MUST be in the form of a URL. This is a REQUIRED property.

This method returns the authorizationUrl property from OAuthFlow instance.

Returns:String

String authorizationUrl

getRefreshUrlback to summary
public String getRefreshUrl()

The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.

This method returns the refreshUrl property from OAuthFlow instance.

Returns:String

String refreshUrl

getScopesback to summary
public Map<String, String> getScopes()

The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. This is a REQUIRED property.

This method returns the scopes property from OAuthFlow instance.

Returns:Map<String, String>

a copy Map (potentially immutable) containing scopes and their descriptions

getTokenUrlback to summary
public String getTokenUrl()

The token URL to be used for this flow. This MUST be in the form of a URL. This is a REQUIRED property.

This method returns the tokenUrl property from OAuthFlow instance.

Returns:String

String tokenUrl

refreshUrlback to summary
public default OAuthFlow refreshUrl(String refreshUrl)

The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.

Applies to oauth2.

This method sets the refreshUrl property of OAuthFlow instance to the given refreshUrl argument and returns the modified instance.

Parameters
refreshUrl:String

the URL to be used for obtaining refresh tokens

Returns:OAuthFlow

OAuthFlow instance with the set refreshUrl property

removeScopeback to summary
public void removeScope(String scope)

Removes the given scope item to this scope mapping.

Parameters
scope:String

the name of a scope

scopesback to summary
public default OAuthFlow scopes(Map<String, String> scopes)

The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. This is a REQUIRED property.

Applies to oauth2.

This method sets the scopes property of OAuthFlow instance to the given argument and returns the modified instance.

Parameters
scopes:Map<String, String>

the available scopes for the OAuth2 security scheme

Returns:OAuthFlow

OAuthFlow instance with the set scopes property

setAuthorizationUrlback to summary
public void setAuthorizationUrl(String authorizationUrl)

The authorization URL to be used for this flow. This MUST be in the form of a URL. This is a REQUIRED property.

Applies to oauth2 ("implicit", "authorizationCode").

This method sets the authorizationUrl property of an OAuthFlow instance to the given authorizationUrl argument.

Parameters
authorizationUrl:String

the authorization URL used for this flow

setRefreshUrlback to summary
public void setRefreshUrl(String refreshUrl)

The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.

Applies to oauth2.

This method sets the refreshUrl property of OAuthFlow instance to the given refreshUrl argument.

Parameters
refreshUrl:String

the URL to be used for obtaining refresh tokens

setScopesback to summary
public void setScopes(Map<String, String> scopes)

The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. This is a REQUIRED property.

Applies to oauth2.

This method sets the scopes property of OAuthFlow instance to the given argument.

Parameters
scopes:Map<String, String>

the available scopes for the OAuth2 security scheme

setTokenUrlback to summary
public void setTokenUrl(String tokenUrl)

The token URL to be used for this flow. This MUST be in the form of a URL. This is a REQUIRED property.

Applies to oauth2 ("password", "clientCredentials", "authorizationCode").

This method sets the tokenUrl property of OAuthFlow instance to the given tokenUrl argument.

Parameters
tokenUrl:String

the token URL to be used for this flow

tokenUrlback to summary
public default OAuthFlow tokenUrl(String tokenUrl)

The token URL to be used for this flow. This MUST be in the form of a URL. This is a REQUIRED property.

Applies to oauth2 ("password", "clientCredentials", "authorizationCode").

This method sets the tokenUrl property of OAuthFlow instance to the given tokenUrl argument and returns the instance.

Parameters
tokenUrl:String

the token URL to be used for this flow

Returns:OAuthFlow

OAuthFlow instance with the set tokenUrl property