OAuthAuthorizationServerProvider.OnGrantClientCredentials Property

Called when a request to the Token endpoint arrives with a "grant_type" of "password". This occurs when the user has provided name and password credentials directly into the client application's user interface, and the client application is using those to acquire an "access_token" and optional "refresh_token". If the web application supports the resource owner credentials grant type it must validate the context.Username and context.Password as appropriate. To issue an access token the context.Validated must be called with a new ticket containing the claims about the resource owner which should be associated with the access token. The default behavior is to reject this grant type. See also http://tools.ietf.org/html/rfc6749\#section-4.3.2

Namespace:  Microsoft.Owin.Security.OAuth
Assembly:  Microsoft.Owin.Security.OAuth (in Microsoft.Owin.Security.OAuth.dll)

Syntax

'Declaration
Public Property OnGrantClientCredentials As Func(Of OAuthGrantClientCredentialsContext, Task)
    Get 
    Set
'Usage
Dim instance As OAuthAuthorizationServerProvider 
Dim value As Func(Of OAuthGrantClientCredentialsContext, Task)

value = instance.OnGrantClientCredentials

instance.OnGrantClientCredentials = value
public Func<OAuthGrantClientCredentialsContext, Task> OnGrantClientCredentials { get; set; }
public:
property Func<OAuthGrantClientCredentialsContext^, Task^>^ OnGrantClientCredentials {
    Func<OAuthGrantClientCredentialsContext^, Task^>^ get ();
    void set (Func<OAuthGrantClientCredentialsContext^, Task^>^ value);
}
member OnGrantClientCredentials : Func<OAuthGrantClientCredentialsContext, Task> with get, set
function get OnGrantClientCredentials () : Func<OAuthGrantClientCredentialsContext, Task>
function set OnGrantClientCredentials (value : Func<OAuthGrantClientCredentialsContext, Task>)

Property Value

Type: System.Func<OAuthGrantClientCredentialsContext, Task>

See Also

Reference

OAuthAuthorizationServerProvider Class

Microsoft.Owin.Security.OAuth Namespace