Package com.azure.core.amqp
Interface ClaimsBasedSecurityNode
-
- All Superinterfaces:
AsyncCloseable,AutoCloseable
public interface ClaimsBasedSecurityNode extends AutoCloseable, AsyncCloseable
Claims-based security (CBS) node that authorizes connections with AMQP services.- See Also:
- AMPQ Claims-based Security v1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Mono<OffsetDateTime>authorize(String audience, String scopes)Authorizes the caller with the CBS node to access resources for theaudience.voidclose()Closes session to the claims-based security node.default Mono<Void>closeAsync()
-
-
-
Method Detail
-
authorize
Mono<OffsetDateTime> authorize(String audience, String scopes)
Authorizes the caller with the CBS node to access resources for theaudience.- Parameters:
audience- The audience to which the token applies. This can be the path within the AMQP message broker.scopes- The requested scopes for theTokenCredential.- Returns:
- A Mono that completes with the callee's expiration date if it is successful and errors if authorization was unsuccessful. Once the expiration date has elapsed, the callee needs to reauthorize with the CBS node.
-
close
void close()
Closes session to the claims-based security node.- Specified by:
closein interfaceAutoCloseable
-
closeAsync
default Mono<Void> closeAsync()
- Specified by:
closeAsyncin interfaceAsyncCloseable
-
-