Definition
Assembly: Microsoft.OData.Mcp.Authentication.dll Namespace: Microsoft.OData.Mcp.Authentication.Outbound Inheritance: System.ObjectSyntax
Summary
Parses and formats the CLI--grant wire names for OutboundGrantKind.
Remarks
OutboundGrantKind.RefreshToken is intentionally excluded from OutboundGrantKind@): it is never a value an operator passes on the command line, only a kind the outbound auth handler selects internally once a refresh token is cached. OutboundGrantKind) still formats it, because log lines and cache diagnostics need a name for every defined value.Methods
ToWireName
Formats a grant kind as its RFC wire name.Syntax
Parameters
Returns
Type:string
device_code, authorization_code, client_credentials, identity_assertion,
or refresh_token.
Exceptions
Examples
TryParse
Parses a CLI--grant wire name into an OutboundGrantKind.
Syntax
Parameters
Returns
Type:bool
true when value is device_code, authorization_code,
client_credentials, or identity_assertion; otherwise false.
Examples
Remarks
null, empty, and white-space-only values return false rather than throwing,
so a caller can use this directly against an optional CLI option value.