func (s *IdentityService) GetHOTP(user string) (*hotp.HOTP, error) {
	bytes, err := s.backend.GetVal([]string{"web", "users", user},
		"hotp")
	if err != nil {
		if trace.IsNotFound(err) {
			return nil, trace.NotFound("user '%v' is not found", user)
		}
		return nil, trace.Wrap(err)
	}
	otp, err := hotp.Unmarshal(bytes)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return otp, nil
}
// GetHOTP gets HOTP token state for a user
GetHOTP gets HOTP token state for a user
// GetHOTP gets HOTP token state for a user
func (s *IdentityService) GetHOTP(user string) (*hotp.HOTP, error) {
	bytes, err := s.backend.GetVal([]string{"web", "users", user},
		"hotp")
	if err != nil {
		if trace.IsNotFound(err) {
			return nil, trace.NotFound("user '%v' is not found", user)
		}
		return nil, trace.Wrap(err)
	}
	otp, err := hotp.Unmarshal(bytes)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return otp, nil
}
func ( s * IdentityService ) GetHOTP ( user string ) ( * hotp . HOTP , error ) { bytes , err := s . backend . GetVal ( [ ] string { " " , " " , user } , " " ) if err != nil { if trace . IsNotFound ( err ) { return nil , trace . NotFound ( " " , user ) } return nil , trace . Wrap ( err ) } otp , err := hotp . Unmarshal ( bytes ) if err != nil { return nil , trace . Wrap ( err ) } return otp , nil }
GetHOTP gets HOTP token state for a user
GetHOTP gets HOTP token state for a user