Functions | |
BOOLEAN | ProviderAlreadyInPolicy (IN EFI_GUID *NewGuid) |
EFI_STATUS | EnrollUserOnProvider (IN EFI_USER_INFO_IDENTITY_POLICY *Identity, IN EFI_USER_PROFILE_HANDLE User) |
EFI_STATUS | DeleteUserOnProvider (IN EFI_USER_INFO_IDENTITY_POLICY *Identity, IN EFI_USER_PROFILE_HANDLE User) |
VOID | DeleteCredentialFromProviders (IN UINT8 *IdentityPolicy, IN UINTN IdentityPolicyLen, IN EFI_USER_PROFILE_HANDLE User) |
VOID | DeleteProviderFromPolicy (IN EFI_USER_INFO_IDENTITY_POLICY *IdentityPolicy, IN UINTN Offset) |
VOID | AddProviderToPolicy (IN EFI_GUID *NewGuid) |
EFI_STATUS | UpdateCredentialProvider () |
BOOLEAN | CheckNewIdentityPolicy (IN UINT8 *PolicyInfo, IN UINTN PolicyInfoLen) |
VOID | SaveIdentityPolicy (VOID) |
VOID | AddIdentityPolicyItem (VOID) |
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
VOID AddIdentityPolicyItem | ( | VOID | ) |
Update the mUserInfo.NewIdentityPolicy, and UI when 'add option' is pressed.
References AddProviderToPolicy(), CREDENTIAL_PROVIDER_INFO::Count, mProviderChoice, mProviderInfo, mUserInfo, USER_INFO::NewIdentityPolicy, USER_INFO::NewIdentityPolicyLen, CREDENTIAL_PROVIDER_INFO::Provider, ProviderAlreadyInPolicy(), and ResolveIdentityPolicy().
Referenced by UserProfileManagerCallback().
VOID AddProviderToPolicy | ( | IN EFI_GUID * | NewGuid | ) |
Add a new provider to the mUserInfo.NewIdentityPolicy.
It is invoked when 'add option' in UI is pressed.
[in] | NewGuid | Points to the credential provider guid. |
References mConncetLogical, mUserInfo, USER_INFO::NewIdentityPolicy, USER_INFO::NewIdentityPolicyLen, USER_INFO::NewIdentityPolicyModified, TRUE, and UINTN().
Referenced by AddIdentityPolicyItem().
BOOLEAN CheckNewIdentityPolicy | ( | IN UINT8 * | PolicyInfo, | |
IN UINTN | PolicyInfoLen | |||
) |
Check whether the identity policy is valid.
[in] | PolicyInfo | Point to the identity policy. |
[in] | PolicyInfoLen | The policy length. |
TRUE | The policy is a valid identity policy. | |
FALSE | The policy is not a valid identity policy. |
Referenced by SaveIdentityPolicy().
VOID DeleteCredentialFromProviders | ( | IN UINT8 * | IdentityPolicy, | |
IN UINTN | IdentityPolicyLen, | |||
IN EFI_USER_PROFILE_HANDLE | User | |||
) |
Delete User's credental from all the providers that exist in User's identity policy.
[in] | IdentityPolicy | Point to User's identity policy. |
[in] | IdentityPolicyLen | The length of the identity policy. |
[in] | User | Points to user profile. |
References DeleteUserOnProvider(), and UINTN().
Referenced by DeleteUser(), and UpdateCredentialProvider().
VOID DeleteProviderFromPolicy | ( | IN EFI_USER_INFO_IDENTITY_POLICY * | IdentityPolicy, | |
IN UINTN | Offset | |||
) |
Remove the provider specified by Offset from the new user identification record.
[in] | IdentityPolicy | Point to user identity item in new identification policy. |
[in] | Offset | The item offset in the new identification policy. |
References mUserInfo, USER_INFO::NewIdentityPolicyLen, and UINTN().
Referenced by UpdateCredentialProvider().
EFI_STATUS DeleteUserOnProvider | ( | IN EFI_USER_INFO_IDENTITY_POLICY * | Identity, | |
IN EFI_USER_PROFILE_HANDLE | User | |||
) |
Delete the User's credential record on the provider.
[in] | Identity | Point to EFI_USER_INFO_IDENTITY_CREDENTIAL_PROVIDER user info. |
[in] | User | Points to user profile. |
EFI_SUCCESS | Delete User's credential record successfully. | |
Others | Fail to add or delete record. |
References CREDENTIAL_PROVIDER_INFO::Count, mProviderInfo, CREDENTIAL_PROVIDER_INFO::Provider, and UINTN().
Referenced by DeleteCredentialFromProviders().
EFI_STATUS EnrollUserOnProvider | ( | IN EFI_USER_INFO_IDENTITY_POLICY * | Identity, | |
IN EFI_USER_PROFILE_HANDLE | User | |||
) |
Add the user's credential record in the provider.
[in] | Identity | Identity policy item including credential provider. |
[in] | User | Points to user profile. |
EFI_SUCCESS | Add or delete record successfully. | |
Others | Fail to add or delete record. |
References CREDENTIAL_PROVIDER_INFO::Count, mProviderInfo, CREDENTIAL_PROVIDER_INFO::Provider, and UINTN().
Referenced by UpdateCredentialProvider().
BOOLEAN ProviderAlreadyInPolicy | ( | IN EFI_GUID * | NewGuid | ) |
Verify the new identity policy in the current implementation. The same credential provider can't appear twice in one identity policy.
[in] | NewGuid | Points to the credential provider guid. |
TRUE | The NewGuid was found in the identity policy. | |
FALSE | The NewGuid was not found. |
References mUserInfo, USER_INFO::NewIdentityPolicy, USER_INFO::NewIdentityPolicyLen, TRUE, and UINTN().
Referenced by AddIdentityPolicyItem().
VOID SaveIdentityPolicy | ( | VOID | ) |
Save the identity policy and update UI with it.
This funciton will verify the new identity policy, in current implementation, the identity policy can be: T, P & P & P & ..., P | P | P | ... Here, "T" means "True", "P" means "Credential Provider", "&" means "and", "|" means "or". Other identity policies are not supported.
References CheckNewIdentityPolicy(), EFI_STATUS(), FindInfoByType(), USER_INFO::IdentityPolicy, USER_INFO::IdentityPolicyLen, mModifyUser, mUserInfo, mUserManager, USER_INFO::NewIdentityPolicy, USER_INFO::NewIdentityPolicyLen, USER_INFO::NewIdentityPolicyModified, ResolveIdentityPolicy(), and UpdateCredentialProvider().
Referenced by UserProfileManagerCallback().
EFI_STATUS UpdateCredentialProvider | ( | ) |
This function replaces the old identity policy with a new identity policy.
This function delete the user identity policy information. If enroll new credential failed, recover the old identity policy.
EFI_SUCCESS | Modify user identity policy successfully. | |
Others | Fail to modify user identity policy. |
References DeleteCredentialFromProviders(), DeleteProviderFromPolicy(), EFI_STATUS(), EnrollUserOnProvider(), USER_INFO::IdentityPolicy, USER_INFO::IdentityPolicyLen, mModifyUser, mUserInfo, USER_INFO::NewIdentityPolicy, USER_INFO::NewIdentityPolicyLen, and UINTN().
Referenced by SaveIdentityPolicy().