Skip to main content
Version: 5.1

TimePunch Authentication Service

This service enables the access to the user profiles of TimePunch.

IsDatabaseValid

This method checks the database structure of the transferred modules. If the database structure of a module does not fit, an error message is returned in the fault object.

void IsDatabaseValid(  
TpAuthentication authentication,
string[] moduleKeys,
out TpFault fault);
Needed Permission---
NameModifierDescription
faultOutContains the error if an exception occurs. AuthenticationFailure.TimePunchOutdated AuthenticationFailure.OldDatabaseVersion AuthenticationFailure.NoDatabaseConnection AuthenticationFailure.UnexpectedException
authenticationUser authentication
moduleKeysList of module identifier to check the database structure

The Fault object returned is of type TpAuthenticationFault

The following module keys are currently known:

SchlüsselModul
DatafoxDatafox – Time recording devices
AttendanceTimePunch Attendance – Attendance Sheet
CutterTimePunch Cutter – Working Hour Window
CalendarTimePunch Calendar – Leave Requests
SelfServiceTimePunch SelfService – Personal data
OnlineTimePunch Online - Mobile time recording
StudioTimePunch Studio - Time recording at the central service PC
WatcherTimePunch Watcher - Time recording at the own PC
ManagementTimePunch Management - Manage employees and working time

ValidateAuthentication

This method validates the authentication data and returns the user permissions after the successful validation of the user. Additionally the user license gets validated against the given application keys. If the application keys are null, it gets validated if the user owns at least one application license, independent of which.

ValidatedAuthenticationDto ValidateAuthentication (  
out TpFault fault,
TpAuthentication authentication
string[] applicationKeys);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysKeys of the application for which the license informations shall be validated.
return valueValidated authentication object, containing a collection of the user permissions

The application keys are defined in the class TimePunch.Enums.Core.ApplicationKeys as constant values.

ValidateAuthenticationWithProductLine

This method checks the specified credentials and returns user privileges after successful validation. If no application key is specified, the system only checks whether the user has a license at all - regardless of which one it is.

In addition, this method returns the licensed product line.

ValidatedAuthenticationDto ValidateAuthenticationWithProductLine(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
out ProductLine licensedProductLine);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysKeys of the application for which the license informations shall be validated.
LicensedProductLineOutProductline that is used by the user. Undefined Currently no product line is set TimePunchPro Licensed for TimePunch PRO TimePunchOne Licensed for TimePunch ONE TimePunchTen Licensed for TimePunch TEN
return valueValidated authentication object, containing a collection of the user permissions

The application keys are defined as constants in the class TimePunch.Enums.Core.ApplicationKeys.

GetPrincipalAndIdentityProfile

This method determines the Principal (the owner of rights), as well as the Identity used (the user identity).

void GetPrincipalAndIdentityProfile(  
out TpFault fault,
TpAuthentication authentication,
out UserProfileDto principalDto,
out UserProfileDto identityDto);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
principalDtoOutReturns the principal object, which is the user that is used for permissioning in TimePunch.
identityDtoOutReturns the identity object, which is the user to whom the changes/modifications or commands are applied.

GetCoveredUserProfiles

This method identifies all TimePunch profiles which the user can administrate. All TimePunch profiles that are returned with this method can be used as the identity Parameter for the authentication object.

List<UserProfileDto> GetCoveredUserProfiles(  
out TpFault fault,
TpAuthentication authentication);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
return valueCollection of the user profiles that the given authentication can administrate.

GetEntitledUserProfiles

This method returns all TimePunch profiles. This result is independent of the user authentication.

List<UserProfileDto> GetEntitledUserProfiles(  
out TpFault fault,
TpAuthentication authentication);
Needed Permissioncore@logon (if server logon is with username)
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
return valueCollection of the user profiles that are authorized to use TimePunch.

GetLicensedUserProfiles

This method returns all TimePunch profiles, which owns an active and valid license. Additionally the user license gets validated against the given application keys. If the application keys are null, it gets validated if the user owns at least one application license, independent of which.

List<UserProfileDto> GetLicensedUserProfiles (  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys);
Needed Permissioncore@logon (if server logon is with username)
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysKeys of the application for which the license informations shall be validated.
return valueCollection of the user profiles that own a valid TimePunch license.

The application keys are defined in the class TimePunch.Enums.Core.ApplicationKeys as constant values.

SearchAuthorizedUsers

This method can be used to search for staff members which can logon to the system. That are most users that have access to TimePunch.

List<UserProfileDto> SearchAuthorizedUsers(  
out TpFault fault,
TpAuthentication authentication,
UserSearchDto userSearchDto);
Needed Permissioncore@logon (if server logon is with username)
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userSearchDtoSearch object that specifies what to search for.
return valueCollection of the user profiles that are authorized to use TimePunch.

SearchUserLogons

This method can return extended information to the user profiles. Additionally to the basic data, the permissions and the first / last entry date of the user profile will be returned.

List<UserLogonDto> SearchUserLogons(  
out TpFault fault,
TpAuthentication authentication,
UserSearchDto userSearchDto)
Needed PermissionuserProfiles@access
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
userSearchDtoSearch object that specifies what to search for.
return valueCollection of the user profiles that are authorized to use TimePunch.

SetPassword

This method is used to set the logon password for a member. The password will only be set for the member that is authenticated through the authentication object.

void SetPassword(  
out TpFault fault,
TpAuthentication authentication,
string newHashedPwd);
Needed Permissionpassword@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
newHashedPwdNew Password. The password must already been hashed with the MD5 algorithm.

GetAutoRegistration

This method returns internal information about the Auto-Registration feature of TimePunch. This feature allows new employees to log in directly to TimePunch without having an administrator create the profile in TimePunch.

AutoregistrationDto GetAutoRegistration(  
out TpFault fault,
TpAuthentication authentication);
Needed Permission---
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
clientVersionThis must be a valid version of the client. The server checks the version against allowed values, to indicate that the client is compatible with the server
return valueInformation about the auto-registration feature of TimePunch.

SaveAutoRegistration

Use this method to set or change the Auto-Registration feature of TimePunch.

void SaveAutoRegistration(  
out TpFault fault,
TpAuthentication authentication,
AutoregistrationDto autoregistration);
Needed Permissioncore@administrate
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
autoregistrationInformation about the auto-registration feature of TimePunch