GetAuthStateEx

GetAuthStateEx

Gets the current authentication state of an authenticated identities as well as the identity's current position in the authentication process for a specified service.

HRESULT GetAuthStateEx(
       IN PassportIdentityHandle hIdentity,
       IN LPCWSTR wzServiceTarget,
       OUT OPTIONAL HRESULT * phrAuthState,
       OUT OPTIONAL HRESULT * phrAuthRequired,
       OUT OPTIONAL HRESULT * phrRequestStatus,
       OUT OPTIONAL LPWSTR * szWebFlowUrl
       );

hIdentity

The identity handle for which authentication state information is being queried.

wzServiceTarget

The target service name to inquire of about the identity's authentication state. Use the service name that was previously passed to the LogonIdentityEx and  AuthIdentityToService methods.

phrAuthState

An HRESULT value that indicates the current authentication state of the identity. This value can indicate either that the identity is unauthenticated or the means by which the identity is authenticated. The following table describes the values that can be returned in this parameter.

HRESULT Code

Description

PPCRL_AUTHSTATE_E_UNAUTHENTICATED

The identity has not been authenticated.

phrAuthRequired

Not used. Always returns 0.

phrRequestStatus

An HRESULT value indicating the status of the most recent request. If there was an authentication error, the value returned in this parameter will describe the specific problem, such as an attempt to sign in by using an incorrect password.

szWebFlowUrl

A URL that indicates the address of the web page that will enable the user to take the next step to complete authentication. If a value is present in this output parameter, the client application should start a browser and go to this URL.

The following table describes the return values for this method.

HRESULT Code

Description

S_OK

The authentication state of the identity was successfully retrieved.

PPCRL_E_UNABLE_TO_RETRIEVE_SERVICE_TOKEN

No information was found for the given target service. Usually means that no attempt to authenticate the user has been made in the current IDCRL session.

Show:
© 2016 Microsoft